Hi Kris
The basic difference between continue and break is as follows:
continue takes the control to the first statement of the corresponding loop whereas the break statement exits from the loop.
Your programme is got many errors and so i have written my program modifying urs..which goes as follows
import java.io.*;
public class Test
{
public static void main(
String args[])
{
for(int i=0;i<10;i++)
{
//doSomething();
System.out.println("Entered the outer loop");
for(int j=0;j<2;j++){ // for loop to be executed perfectly
if(j==0){ // requires boolean condition
break;
}
//doSomethingElse();
System.out.println("Entered the inner loop");
}
}
}
}
Here the if condition tests for value of j equal to o and then exits since it comes across break statement. Hope this example solves your doubt.
Regards
venu