MCQ PracticeSingle Best AnswerTopic: Java Constructor and Methods
Q
What 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 ) ;
}
}
Question ID
#2176
Subchapter
Java Constructor and Methods
Action
Choose one option below
Choose Your Answer
Click an option to check whether your answer is correct.