Computer Applications
State whether the following statement is True or False :
The break statement may not be used in a switch statement.
Java Operators
15 Likes
Answer
False
Answered By
2 Likes
Related Questions
State whether the following statement is True or False :
An if-else construct accomplishes 'fall through'.
State whether the following statement is True or False :
In a switch case, when the switch value does not match with any case then the execution transfers to the default case.
Predict the output of the following Java program code snippet:
int m=3,n=5,p=4; if(m==n && n!=p) { System.out.println(m*n); System.out.println(n%p); } if((m!=n) || (n==p)) { System.out.println(m+n); System.out.println(m-n); }
Predict the output of the following Java program code snippet:
int a=1,b=2,c=3; switch(p) { case 1: a++; case 2: ++b; break; case 3: c--; } System.out.println(a + "," + b + "," +c);