JAVA Constructors and Methods In which area of memory, the system stores parameters and local variables whenever a method is invoked? Array Heap Storage Area Stack Array Heap Storage Area Stack ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the modifier can't be used for constructors? static public private protected static public private protected ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is Math.floor(3.6)? 3.0 3 4 4.0 3.0 3 4 4.0 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++; }} Compilation Error 2 None of these 3 1 Compilation Error 2 None of these 3 1 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); }} B 8 A 5 A B 8 A B 5 A 5 B 8 None of these B 8 A 5 A B 8 A B 5 A 5 B 8 None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code ?1. public class A{2. int add(int i, int j){3. return i+j;4. }5. }6. public class B extends A{7. public static void main(String argv[]){8. short s = 9;9. System.out.println(add(s,6));10. }11.} Compile fail due to error on line no 2 Compile fail due to error on line no 9 None of these 15 Compile fail due to error on line no 8 Compile fail due to error on line no 2 Compile fail due to error on line no 9 None of these 15 Compile fail due to error on line no 8 ANSWER DOWNLOAD EXAMIANS APP