JAVA Constructors and Methods The variables declared in a class for the use of all methods of the class are called reference variables None of these instance variables objects reference variables None of these instance variables objects 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 public class Test { }What is the prototype of the default constructor? None of these Test( ) public Test( ) public Test(void) Test(void) None of these Test( ) public Test( ) public Test(void) Test(void) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The implicit return type of a constructor is None of these A class object in which it is defined. There is no return type. void None of these A class object in which it is defined. There is no return type. void 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);}} Compile time error as final method can't be overloaded Method 1 None of these Method 2 Compile time error as final method can't be overloaded Method 1 None of these Method 2 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 8 Compile fail due to error on line no 9 Compile fail due to error on line no 2 None of these 15 Compile fail due to error on line no 8 Compile fail due to error on line no 9 Compile fail due to error on line no 2 None of these 15 ANSWER DOWNLOAD EXAMIANS APP