JAVA Constructors and Methods The implicit return type of a constructor is A class object in which it is defined. None of these There is no return type. void A class object in which it is defined. None of these There is no return type. void 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(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{} void examians() {} throws IOException ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output of the program?class Test{ public int display(int x, int y){ return ("The sum of x and y is " + x + y); } public static void main(String args[]){ Test test = new Test(); System.out.println(test.display(4,5)); } } The sum of x and y is 45 does not compile The sum of x and y is 9 None of these The sum of x and y is 45 does not compile The sum of x and y is 9 None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to An object, variable or method goes out of scope. An object or variable goes out of scope. None of these A variable goes out of scope. Before garbage collection. An object, variable or method goes out of scope. An object or variable goes out of scope. None of these A variable goes out of scope. Before garbage collection. 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 objects None of these instance variables reference variables objects 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( ) ) ) ; }} 0.0 0.5 1.0 10.0 0.0 0.5 1.0 10.0 ANSWER DOWNLOAD EXAMIANS APP