JAVA Constructors and Methods What is Math.floor(3.6)? 4 4.0 3 3.0 4 4.0 3 3.0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? void None of these double int void None of these double int 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 10.0 1.0 0.0 0.5 10.0 1.0 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 9 None of these does not compile The sum of x and y is 45 The sum of x and y is 9 None of these does not compile The sum of x and y is 45 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The main method should be static for the reason It can be executed without creating any instance of the class. It can be accessed by every method or variable without any hindrance. It can be accessed easily by the class loader. None of these It can be executed without creating any instance of the class. It can be accessed by every method or variable without any hindrance. It can be accessed easily by the class loader. None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code?public class Test{ public static void printValue(int i, int j, int k){ System.out.println("int"); } public static void printValue(byte...b){ System.out.println("long"); } public static void main(String... args){ byte b = 9; printValue(b,b,b); }} int Compilation clean but throws RuntimeException None of these long Compilation fails int Compilation clean but throws RuntimeException None of these long Compilation fails ANSWER DOWNLOAD EXAMIANS APP