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 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); }} Compilation clean but throws RuntimeException Compilation fails None of these int long Compilation clean but throws RuntimeException Compilation fails None of these int long ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the modifier can't be used for constructors? static protected private public static protected private public 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(); All of these A a = new B(5); None of these A a = new A(String s); A a = new B(); All of these A a = new B(5); None of these 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. examians() throws IOException{} void examians() throw IOException{} void examians() throws IOException{} void examians() {} throws IOException void examians(void) throws IOException{} examians() throws IOException{} void examians() throw IOException{} void examians() throws IOException{} void examians() {} throws IOException void examians(void) throws IOException{} ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to A variable goes out of scope. Before garbage collection. An object, variable or method goes out of scope. None of these An object or variable goes out of scope. A variable goes out of scope. Before garbage collection. An object, variable or method goes out of scope. None of these An object or variable goes out of scope. ANSWER DOWNLOAD EXAMIANS APP