Quote:
|
Originally Posted by Shamsi
(Toggle Plain Text)
String Option0=JOptionPane.showInputDialog("Enter Number to Exit from The Programme");
int z=Integer.parseInt(Option0);
if (z == 0){// 0 is the number of exiting for the programme
break;
}// to stop the programme from running String Option0=JOptionPane.showInputDialog("Enter Number to Exit from The Programme");
int z=Integer.parseInt(Option0);
if (z == 0){// 0 is the number of exiting for the programme
break;
}// to stop the programme from running
the error says"breaks outside switch or loop"
|
You havn't got any loops shown for you to break out of with the break statement within your if statement, so as far as i can see your trying to break out of nothing.
Chris