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{} 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 void examians() throw IOException{} void examians() throws IOException{} ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The finalize() method is called just prior to Before garbage collection. An object or variable goes out of scope. An object, variable or method goes out of scope. None of these A variable goes out of scope. Before garbage collection. An object or variable goes out of scope. An object, variable or method goes out of scope. None of these A variable goes out of scope. ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the expected output?class Animal {Animal() {System.out.println("Animal");}}class Wild extends Animal{Wild() {System.out.println("Wild");super();}}public class Test {public static void main(String args[]) {Wild wild = new Wild();}} Compilation Error Wild Animal Animal Wild Runtime Exception Compilation Error Wild Animal Animal Wild Runtime Exception 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( ) ) ) ; }} 1.0 0.0 10.0 0.5 1.0 0.0 10.0 0.5 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the return type of a method that not returns any value? int None of these double void int None of these double void ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The implicit return type of a constructor is None of these A class object in which it is defined. void There is no return type. None of these A class object in which it is defined. void There is no return type. ANSWER DOWNLOAD EXAMIANS APP