Java 标签丢失,错误为eclipse

Java 标签丢失,错误为eclipse,java,continue,Java,Continue,我有这段代码,基本上我的问题是我想返回while循环。我第一次试着继续,但我发现它不起作用 } else { JOptionPane.showMessageDialog(null, "You Did Not Choose Between Keep Or Execute..Program Exiting","Error Nothing Chosed",JOptionPane.ERROR_MESSAGE); continue test;

我有这段代码,基本上我的问题是我想返回while循环。我第一次试着继续,但我发现它不起作用

}
else
{
JOptionPane.showMessageDialog(null, "You Did Not Choose Between Keep Or Execute..Program Exiting","Error Nothing Chosed",JOptionPane.ERROR_MESSAGE);
                    continue test;
                }
            }else{
                JOptionPane.showMessageDialog(null,"An Error Occured, Please Restart The Game!","Winner Error",JOptionPane.ERROR_MESSAGE);
                Attack=false;
                MainMenu=true;
            }
        }
} }
我尝试返回下面的代码,但它不起作用。所以我的问题是,我如何用continue语句或其他语句来实现这一点。。多谢各位

test: 
        {while(MainMenu){
    String M1=JOptionPane.showInputDialog(Name1+" you are starting first. Here are your options\n 1.Invade \n 2.Buy \n 3.Pass \n 4.Check Money Balance \n 5.Check Soldier Count \n 6.Citizen's Hapinness","Type the Number of the action you want to take place");
    if(M1.equals("1")){
        if(CityNum==1){
        JOptionPane.showInputDialog("You are Currently At The Veiled Atoll so you have the option to invade \n 1.Zicat Penishula \n 2.Flehst Archipelago \n 3.The Sharktooth Isle","Type the Number of the Island you want to Invade");
        String CurrentIsland="The Veiled Atoll";
        MainMenu=false;
        Attack=true;
        }

你的录音格式糟透了我知道。。我是一个从视频中学习java的人,所以我不会在我的代码格式上花费太多精力。请不要忽略代码格式。这会导致很多问题errors@FastSnail你说的代码格式到底是什么意思?@fastsnailomg非常感谢你。。是的,这正是我想做的。谢谢你,你是最棒的:)