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( ) ) ) ; }} 10.0 1.0 0.0 0.5 10.0 1.0 0.0 0.5 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods public class Test { }What is the prototype of the default constructor? Test( ) None of these Test(void) public Test(void) public Test( ) Test( ) None of these Test(void) public Test(void) public Test( ) 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() throw IOException{} void examians() {} throws IOException void examians(void) throws IOException{} examians() throws IOException{} void examians() throws IOException{} void examians() throw IOException{} void examians() {} throws IOException void examians(void) throws IOException{} examians() throws IOException{} void examians() throws IOException{} ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods class MyClass{int i;int j;public MyClass(int i, int j){this.i = i;this.j = j;}public void call(){System.out.print("One");}}public class Test{public static void main(String args[]){MyClass m = new MyClass(); //line 1m.call(); //line 2}} One Compilation fails due to an error on line 2 Compilation fails due to an error on line 1 Compilation succeed but no output. One Compilation fails due to an error on line 2 Compilation fails due to an error on line 1 Compilation succeed but no output. 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 reference variables objects instance variables None of these reference variables objects instance variables None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? None of these void int double None of these void int double ANSWER DOWNLOAD EXAMIANS APP