while(true){?? ??? ??? ?//提示輸入要?jiǎng)h除的學(xué)生的ID?? ??? ??? ?System.out.println("請(qǐng)輸入要?jiǎng)h除的學(xué)生ID!");?? ??? ??? ?String ID=console.next();?? ??? ??? ?//判斷該ID是否有對(duì)應(yīng)的學(xué)生對(duì)象?? ??? ??? ?Student st=students.get(ID);?? ??? ??? ?if(st==null){?? ??? ??? ??? ?//提示輸入的ID并不存在?? ??? ??? ??? ?System.out.println("該ID不存在!");?? ??? ??? ??? ?continue;?? ??? ??? ??? ?}?? ??? ??? ?students.remove(ID);?? ??? ??? ?System.out.println("成功刪除學(xué)生:"+st.name);?? ??? ??? ?break;?? ??? ?}上面代碼中,while的判斷條件里放一個(gè)true是什么意思?有什么作用?
不理解代碼中while()的這個(gè)用法
死神的蘋(píng)果
2017-12-31 21:27:43