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 ) ; } } None of these 2.0 0 Compile time error None of these 2.0 0 Compile time error ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? Test( ) Test(void) public Test(void) None of these public Test( ) Test( ) Test(void) public Test(void) None of these public Test( ) 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? Array Heap Stack Storage Area Array Heap Stack Storage Area ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Given the following piece of code:class Person{ public int number;}public class Test{ public void doIt(int i , Person p){ i = 5; p.number = 8; } public static void main(String args[]){ int x = 0; Person p = new Person(); new Test().doIt(x, p); System.out.println(x + " " + p.number); }}What is the result? 0 8 5 8 5 0 0 0 0 8 5 8 5 0 0 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code?public class Test{ public static void printValue(int i, int j, int k){ System.out.println("int"); } public static void printValue(byte...b){ System.out.println("long"); } public static void main(String... args){ byte b = 9; printValue(b,b,b); }} int Compilation clean but throws RuntimeException Compilation fails long None of these int Compilation clean but throws RuntimeException Compilation fails long None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to A variable goes out of scope. None of these Before garbage collection. An object or variable goes out of scope. An object, variable or method goes out of scope. A variable goes out of scope. None of these Before garbage collection. An object or variable goes out of scope. An object, variable or method goes out of scope. ANSWER DOWNLOAD EXAMIANS APP