Why is it that the following code:
class swi
{
public static void main(String[] args)
{
int a=98;
switch(a)
{
continue simply moves directly to the next iteration of the loop.
break is used to break out of loops and switches.
Use break; instead of continue;
Continue:
for(x = 0; x < 10; x++)
{
if(x == 3)
continue;
else
DoIterativeWork();
}
Switch:
switch(a)
{
default:{ System.out.println("default"); break;}
case 'b':{ System.out.println(a); break;}
case 'a':{ System.out.println(a);}
}