hello
does the break statement works with if and else ?
because i`m trying to use it but there is some error that says the break should be out the switch or loop
Code:if (jRadioButton1.isSelected())
{
jLabel2.setText(null);
jLabel1.setText("how old am I");
jRadioButton1.setText("15");
jRadioButton2.setText("16");
jRadioButton3.setText("17");
jRadioButton4.setText("18");
buttonGroup1.clearSelection();
break;
}
else jLabel2.setText("wrong");

