報(bào)錯(cuò)類型:Exception in thread "main" java.util.NoSuchElementException代碼:public class text { public static void main(String[] args) { // TODO Auto-generated method stub? ? Scanner input=new Scanner(System.in);? ? System.out.println("***************歡迎使用鄭鄭租車系統(tǒng)**************");? ? System.out.println("本公司提供小轎車,小客車,貨車的租用");? ? for(int i=1;i<=3;i++){? ? System.out.println("請(qǐng)輸入你要租用的車型:");? ? String name=input.next();? ? if("小轎車".equals(name)){? ? Zuche text=new 小轎車();? ? text.nums();? ? text.message();? ? continue;? ? }if("小客車".equals(name)){? ? Zuche text1=new 小客車();? ? text1.nums();? ? text1.message();? ? continue;? ? }if("貨車".equals(name)){? ? Zuche text=new 貨車();? ? text.nums();? ? text.message();? ? continue;? ? }? }? ? input.close(); ?}}
為什么會(huì)報(bào)錯(cuò)呢,報(bào)錯(cuò)類型如下,代碼如下
慕的地1533170
2016-04-06 16:33:09