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 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 2 Method 1 Compile time error as final method can't be overloaded None of these Method 2 Method 1 Compile time error as final method can't be overloaded None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? public Test(void) Test(void) Test( ) None of these public Test( ) public Test(void) Test(void) Test( ) None of these public Test( ) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The variables declared in a class for the use of all methods of the class are called objects reference variables None of these instance variables objects reference variables None of these instance variables ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class MyClass{ }For the above class(MyClass) what is the correct way of declaring constructor? MyClass(){} public MyClass(void){} 1 and 3 public MyClass(){} MyClass(void) {} MyClass(){} public MyClass(void){} 1 and 3 public MyClass(){} MyClass(void) {} 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 ? A a = new A(String s); A a = new B(); None of these All of these A a = new B(5); A a = new A(String s); A a = new B(); None of these All of these A a = new B(5); ANSWER DOWNLOAD EXAMIANS APP