JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? public Test( ) None of these Test( ) public Test(void) Test(void) public Test( ) None of these Test( ) public Test(void) Test(void) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class MyClass{ }For the above class(MyClass) what is the correct way of declaring constructor? public MyClass(void){} MyClass(void) {} MyClass(){} 1 and 3 public MyClass(){} public MyClass(void){} MyClass(void) {} MyClass(){} 1 and 3 public MyClass(){} ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods 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 ) ; } } 0 Compile time error None of these 2.0 0 Compile time error None of these 2.0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? void double None of these int void double None of these int ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods class A{ A(String s){} A(){}}1. class B extends A{2. B(){}3. B(String s){4. super(s);5. }6. void test(){7. // insert code here8. }9. }Which of the below code can be insert at line 7 to make clean compilation ? A a = new B(); A a = new A(String s); All of these A a = new B(5); None of these A a = new B(); A a = new A(String s); All of these A a = new B(5); None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods In which area of memory, the system stores parameters and local variables whenever a method is invoked? Heap Stack Array Storage Area Heap Stack Array Storage Area ANSWER DOWNLOAD EXAMIANS APP