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 What is the output for the below code ?class A{ public A(){ System.out.println("A"); } public A(int i){ this(); System.out.println(i); }}class B extends A{ public B(){ System.out.println("B"); } public B(int i){ this(); System.out.println(i+3); }}public class Test{ public static void main (String[] args){ new B(5); }} B 8 A 5 A B 5 None of these A B 8 A 5 B 8 B 8 A 5 A B 5 None of these A B 8 A 5 B 8 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 Heap Stack Array Storage Area Heap Stack Array ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods class MyClass{ MyClass(){ System.out.print("one"); } public void myMethod(){ this(); System.out.print("two"); }} public class TestClass{ public static void main(String args[]){ MyClass obj = new MyClass(); obj.myMethod(); }} None of these one one two two one one one Exception Compilation Error None of these one one two two one one one Exception Compilation Error 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 instance variables reference variables None of these objects instance variables reference variables None of these objects ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of these is a legal definition of a method named examveda assuming it throws IOException, and returns void. Also assume that the method does not take any arguments. Select the one correct answer. void examians() throws IOException{} void examians(void) throws IOException{} void examians() throw IOException{} examians() throws IOException{} void examians() {} throws IOException void examians() throws IOException{} void examians(void) throws IOException{} void examians() throw IOException{} examians() throws IOException{} void examians() {} throws IOException ANSWER DOWNLOAD EXAMIANS APP