如何重新提示用户输入答案?

时间:2016-04-21 16:35:38

标签: java

如果我转而使用while语句,我将如何得到提示将其恢复到序列的开头?

 if (al.contains(room)) {
      System.out.println("Entered "+room);
    }
 else {
     System.err.println("I couldnt get that, please type exactly which room you want to enter:  ");
 }

0 个答案:

没有答案