Declaration and Access Control What can directly access and change the value of the variable qusNo?package com.mypackage;public class Test{ private int qusNo = 100;} None of these Any class in com.mypackage package. Only the Test class. Any class that extends Test. Any class. None of these Any class in com.mypackage package. Only the Test class. Any class that extends Test. Any class. ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output for the below code?static public class Test{ public static void main(String[] args){ char c = 'a'; switch(c){ case 65 : System.out.println("one");break; case 'a': System.out.println("two");break; case 3 : System.out.println("three"); } }} Compile error - Illegal modifier for the class Test; only public, abstract & final are permitted. None of these two one Compile error - char can't be permitted in switch statement. Compile error - Illegal modifier for the class Test; only public, abstract & final are permitted. None of these two one Compile error - char can't be permitted in switch statement. 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 one 20 one two one two 20 20 one one 20 one two one two 20 20 ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control A package is a collection of Classes and Interfaces Editing tools Classes Interfaces Editing tools and Interfaces Classes and Interfaces Editing tools Classes Interfaces Editing tools and Interfaces ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control What will be the output for the below code?public class Test{ static{ int a = 5; } public static void main(String[] args){ System.out.println(a); }} Runtime Exception None of these Compile with error 5 0 Runtime Exception None of these Compile with error 5 0 ANSWER DOWNLOAD EXAMIANS APP
Declaration and Access Control The object is created with new keyword Depends on the code At run-time None of these At Compile-time Depends on the code At run-time None of these At Compile-time ANSWER DOWNLOAD EXAMIANS APP