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. native final volatile static abstract native final volatile static abstract 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 A static A None of these static block A A block static A static A None of these static block A ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What is the result of compiling and running the following code?class Base{ private Base(){ System.out.print("Base"); }}public class test extends Base{ public test(){ System.out.print("Derived"); } public static void main(String[] args){ new test(); }} Compilation Error BaseDerived Derived Exception is thrown at runtime Compilation Error BaseDerived Derived Exception is thrown at runtime ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control A package is a collection of Editing tools and Interfaces Classes Interfaces Classes and Interfaces Editing tools Editing tools and Interfaces Classes Interfaces Classes and Interfaces Editing tools 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 None of these one two 1 one two 10 Compile time error. one two 0 None of these one two 1 one two 10 Compile time error. ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control The object is created with new keyword At Compile-time None of these Depends on the code At run-time At Compile-time None of these Depends on the code At run-time ANSWER DOWNLOAD EXAMIANS APP