JAVA Constructors and Methods What is Math.floor(3.6)? 3 4 4.0 3.0 3 4 4.0 3.0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to A variable goes out of scope. An object, variable or method goes out of scope. Before garbage collection. An object or variable goes out of scope. None of these A variable goes out of scope. An object, variable or method goes out of scope. Before garbage collection. An object or variable goes out of scope. None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The implicit return type of a constructor is A class object in which it is defined. There is no return type. None of these void A class object in which it is defined. There is no return type. None of these void ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The main method should be static for the reason None of these It can be accessed by every method or variable without any hindrance. It can be executed without creating any instance of the class. It can be accessed easily by the class loader. None of these It can be accessed by every method or variable without any hindrance. It can be executed without creating any instance of the class. It can be accessed easily by the class loader. 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)); } } does not compile The sum of x and y is 45 None of these The sum of x and y is 9 does not compile The sum of x and y is 45 None of these The sum of x and y is 9 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