Declaration and Access Control The object is created with new keyword At Compile-time None of these At run-time Depends on the code At Compile-time None of these At run-time Depends on the code ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control A package is a collection of Editing tools Editing tools and Interfaces Interfaces Classes Classes and Interfaces Editing tools Editing tools and Interfaces Interfaces Classes Classes and Interfaces ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output after compiling and running following program code?public class Test{ static int a; public static void main(String[] args){ System.out.println("one"); call(1); } static void call(int a){ this.a=10; System.out.println("two "+a); }} one two 0 one two 1 Compile time error. one two 10 None of these one two 0 one two 1 Compile time error. one two 10 None of these ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control Determine Output:class MyClass{ static final int a = 20; static final void call(){ System.out.println("two"); } static{ System.out.println("one"); }}public class Test{ public static void main(String args[]){ System.out.println(MyClass.a); }} one two 20 one 20 one two 20 one one two 20 one 20 one two 20 one ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What is the output for the below code ?public class A{ static{ System.out.println("static"); } { System.out.println("block"); } public A(){ System.out.println("A"); } public static void main(String[] args){ A a = new A(); }} A block static None of these static block A A static A A block static None of these static block A A static A 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);}} 0 6 Compile with error 5 Runtime Exception 0 6 Compile with error 5 Runtime Exception ANSWER DOWNLOAD EXAMIANS APP