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);}} Method 1 Method 2 Compile time error as final method can't be overloaded None of these Method 1 Method 2 Compile time error as final method can't be overloaded None of these 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( ) ) ) ; }} 10.0 0.5 0.0 1.0 10.0 0.5 0.0 1.0 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 Array Stack Heap Storage Area Array Stack Heap 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()); }} Compilation Fails Prints 7 Prints 10 None of these Prints 0 Compilation Fails Prints 7 Prints 10 None of these Prints 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? Test( ) public Test(void) Test(void) None of these public Test( ) Test( ) public Test(void) Test(void) None of these public Test( ) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the modifier can't be used for constructors? private public static protected private public static protected ANSWER DOWNLOAD EXAMIANS APP