JAVA Constructors and Methods In which area of memory, the system stores parameters and local variables whenever a method is invoked? Array Storage Area Stack Heap Array Storage Area Stack Heap ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? double int void None of these double int void None of these 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 Compile time error None of these 2.0 0 Compile time error None of these 2.0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The implicit return type of a constructor is void None of these There is no return type. A class object in which it is defined. void None of these There is no return type. A class object in which it is defined. ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the result of compiling and running the given code?class A{ int b=10; private A(){ this.b=7; } int f(){ return b; }}class B extends A{ int b;}public class Test{ public static void main(String[] args){ A a = new B(); System.out.println(a.f()); }} Prints 7 Prints 0 Compilation Fails None of these Prints 10 Prints 7 Prints 0 Compilation Fails None of these Prints 10 ANSWER DOWNLOAD EXAMIANS APP
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 1 Method 2 None of these Compile time error as final method can't be overloaded Method 1 Method 2 ANSWER DOWNLOAD EXAMIANS APP