如何在Netbeans中循环“主菜单”?
int choice , fili, math, social, PE , pract, progr, ave1, fu = 300, mu = 500, su = 300, peu = 300, pru = 500, ramu = 500;
String str, name;
name = JOptionPane.showInputDialog("Enter name");
JOptionPane.showMessageDialog(null, "Hello " + name);
JOptionPane.showMessageDialog(null, "Proceed to next");
str = JOptionPane.showInputDialog("Subject \n" + "1. Filipino \n" + "2. Math \n" + "3. Social Science \n" + "4. PE1 \n" + "5. Practical Research \n" + "6. Programming \n" + "\n");
choice = Integer.parseInt(str);
if(choice ==1)
{
str = JOptionPane.showInputDialog("Enter Number of Unit in Filipino: " );
fili = Integer.parseInt(str);
JOptionPane.showMessageDialog(null, "Total Amount: " + (fili * fu));
str = JOptionPane.showInputDialog("Subject \n" + "1. Filipino \n" + "2. Math \n" + "3. Social Science \n" + "4. PE1 \n" + "5. Practical Research \n" + "6. Programming \n" + "\n");
choice = Integer.parseInt(str);
}