JAVA Constructors and Methods The finalize() method is called just prior to None of these Before garbage collection. An object, variable or method goes out of scope. An object or variable goes out of scope. A variable goes out of scope. None of these Before garbage collection. An object, variable or method goes out of scope. An object or variable goes out of scope. A variable goes out of scope. 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 public class Test { }What is the prototype of the default constructor? Test(void) public Test(void) public Test( ) None of these Test( ) Test(void) public Test(void) public Test( ) None of these Test( ) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the modifier can't be used for constructors? static protected public private static protected public private 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 None of these 2.0 Compile time error 0 None of these 2.0 Compile time error ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the expected output?class Animal {Animal() {System.out.println("Animal");}}class Wild extends Animal{Wild() {System.out.println("Wild");super();}}public class Test {public static void main(String args[]) {Wild wild = new Wild();}} Wild Animal Compilation Error Animal Wild Runtime Exception Wild Animal Compilation Error Animal Wild Runtime Exception ANSWER DOWNLOAD EXAMIANS APP