MCQ Single Best Answer Not Set

QWhat is the output of the above program?
class Num  {
      Num(double x ){
              System.out.println( x ) ;
      }   
}
public class  Test  extends  Num   {
       public static void main(String[] args){
                  Num num = new Num( 2 ) ;
       }     
}

ID: #2176 Java Constructor and Methods 921 views
Question Info
#2176Q ID
Not SetDifficulty
Java Constructor and MethodsTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • B 2.0
  • C Compile time error
  • D None of the above
Correct Answer: Option C

Explanation

Compile time error

Share This Question

Challenge a friend or share with your study group.