JAVA Constructors and Methods Determine Output:class A{public static void method(int i){System.out.print("Method 1");}public static int method(String str){System.out.print("Method 2");return 0;}}public class Test{ public static void main(String args[]){A.method(5);}} None of these Compile time error as final method can't be overloaded Method 2 Method 1 None of these Compile time error as final method can't be overloaded Method 2 Method 1 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The variables declared in a class for the use of all methods of the class are called objects instance variables None of these reference variables objects instance variables None of these reference variables ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to An object or variable goes out of scope. An object, variable or method goes out of scope. None of these Before garbage collection. A variable goes out of scope. An object or variable goes out of scope. An object, variable or method goes out of scope. None of these Before garbage collection. A variable goes out of scope. ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code ?class A{ public A(){ System.out.println("A"); } public A(int i){ this(); System.out.println(i); }}class B extends A{ public B(){ System.out.println("B"); } public B(int i){ this(); System.out.println(i+3); }}public class Test{ public static void main (String[] args){ new B(5); }} A B 5 A B 8 B 8 A 5 A 5 B 8 None of these A B 5 A B 8 B 8 A 5 A 5 B 8 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? Storage Area Stack Heap Array Storage Area Stack Heap Array ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Determine output of the following program.public class Test{ public static void main(String args[]){ System.out.println( Math.floor( Math.random( ) ) ) ; }} 0.5 0.0 10.0 1.0 0.5 0.0 10.0 1.0 ANSWER DOWNLOAD EXAMIANS APP