Single Choice
Not Set
QWhat 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");
}
}
}
ID: #2120
Declaration and Access Control in Java
697 views
Question Info
#2120Q ID
Not SetDifficulty
Declaration and Access Control in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Compile error - Illegal modifier for the class Test; only public, abstract & final are permitted.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic