String args new Y method 100 A THREE B TWO C ONE D100 E Compile error Ans C 4 3

String args new y method 100 a three b two c one d100

This preview shows page 2 - 5 out of 8 pages.

( String [] args ) { new Y (). method ( 100 ); } } A. THREE B. TWO C: ONE D:100 E: Compile error Ans: C (4) (3 points) What will be the output of the below program? package com . Quiz2 ; public class Q2MC4 { double m1 ( double d ) { return d *= d ; } int m1 ( int i ) { return m1 ( i *= i ); } float m1 ( float f ) { return m1 ( f *= f ); } public static void main ( String [] args ) { Q2MC4 main = new Q2MC4 (); System . out . println ( main . m1 ( 10 )); } } Ans: E A: 10, B: 100.0 C: 20.0 D: compiler error E: Runtime Error.
Image of page 2
(5)(5 points) What will be the output of the below program? { { { ; ; (6) (3 points) Which statement best describes the relationship between superclass andsubclass types?
Image of page 3
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 8 pages?

  • Fall '08
  • Staff

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture