JAVA Constructors and Methods The finalize() method is called just prior to An object, variable or method goes out of scope. An object or variable goes out of scope. Before garbage collection. None of these A variable goes out of scope. An object, variable or method goes out of scope. An object or variable goes out of scope. Before garbage collection. None of these A variable goes out of scope. ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is Math.floor(3.6)? 3.0 3 4.0 4 3.0 3 4.0 4 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? None of these void double int None of these void double int ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Determine output:public class Test{ public static void main(String args[]){ MyClass obj = new MyClass(); obj.val = 1; obj.call(obj); System.out.println(obj.val); }}class MyClass{ public int val; public void call(MyClass ref){ ref.val++; }} 1 None of these 2 3 Compilation Error 1 None of these 2 3 Compilation Error 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 ? All of these None of these A a = new B(); A a = new A(String s); A a = new B(5); All of these None of these A a = new B(); A a = new A(String s); A a = new B(5); ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output of the program?class Test{ public int display(int x, int y){ return ("The sum of x and y is " + x + y); } public static void main(String args[]){ Test test = new Test(); System.out.println(test.display(4,5)); } } The sum of x and y is 9 does not compile The sum of x and y is 45 None of these The sum of x and y is 9 does not compile The sum of x and y is 45 None of these ANSWER DOWNLOAD EXAMIANS APP