Declaration and Access Control The object is created with new keyword At run-time At Compile-time None of these Depends on the code At run-time At Compile-time None of these Depends on the code ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Name the keyword that makes a variable belong to a class, rather than being defined for each instance of the class. abstract native final volatile static abstract native final volatile static ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control You have the following code in a file called Test.javaclass Base{ public static void main(String[] args){ System.out.println("Hello"); }}public class Test extends Base{}What will happen if you try to compile and run this? Compiles and runs with no output. Runtime error It will fail to compile. Compiles and runs printing Compiles and runs with no output. Runtime error It will fail to compile. Compiles and runs printing ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output?public class Test{ public static void main(String[] args){ String value = "abc"; changeValue(value); System.out.println(value); } public static void changeValue(String a){ a = "xyz"; }} Compilation clean but no output abc xyz None of these Compilation fails Compilation clean but no output abc xyz None of these Compilation fails ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output after the following program is compiled and executed?public class Test{ public static void main(String args[]){ int x = 10; x = myMethod(x--); System.out.print(x); } static int myMethod(final int x){ return x--; }} None of these The program will compile successfully and display 10 as output. The will compile successfully and display 9 as output. The program will lead to compilation error. The program will lead to runtime error. None of these The program will compile successfully and display 10 as output. The will compile successfully and display 9 as output. The program will lead to compilation error. The program will lead to runtime error. ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output?public class Test{static{int a = 5;}public static void main(String args[]){new Test().call();}void call(){this.a++;System.out.print(this.a);}} Runtime Exception 5 Compile with error 0 6 Runtime Exception 5 Compile with error 0 6 ANSWER DOWNLOAD EXAMIANS APP