Output : 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:
Output : 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 ) ;} }

1.0

2.1

3.Compile time error

4.None of the above

Posted Date:-2021-10-25 05:21:08


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!