JAVA Constructors and Methods What will be the return type of a method that not returns any value? double int None of these void double int None of these void ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? None of these Test(void) public Test( ) public Test(void) Test( ) None of these Test(void) public Test( ) public Test(void) Test( ) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the modifier can't be used for constructors? private public protected static private public protected static 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 A a = new A(String s); A a = new B(); None of these A a = new B(5); All of these A a = new A(String s); A a = new B(); None of these A a = new B(5); 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. Before garbage collection. A variable goes out of scope. None of these An object or variable goes out of scope. An object, variable or method goes out of scope. Before garbage collection. A variable goes out of scope. None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The following code contains one compilation error, find it?public class Test {Test() { } // line 1static void Test() { this(); } // line 2 public static void main(String[] args) { // line 3Test(); // line 4}} At line 1, constructor Tester must be marked public like its class At line 4 At line 2, constructor call At line 3, compilation error, ambiguity problem, compiler can't determine whether a constructor At line 1, constructor Tester must be marked public like its class At line 4 At line 2, constructor call At line 3, compilation error, ambiguity problem, compiler can't determine whether a constructor ANSWER DOWNLOAD EXAMIANS APP