번호를 입력해 주세요 :Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at trip.admin.board(admin.java:22)
at trip.display.main(display.java:189)
void board(nation list1[],city list2[],muse list3[], display d,sort k){
while(true){
displaymanu();
int i = s.nextInt();
switch(i){
case 1 : searchnation(list1,list2,list3,d); break;
case 2 : searchmuse(list1,list2,list3,d); break;
case 3 : displayall(list1,d); break;
case 4 : searchstar(list1,list2,list3,d); break;
case 5 : givestar(list1,list2,list3,d); break;
case 6 : giveexplain(list3,d); break;
case 7 : sorttop10(list1,list2,list3,d,k); break;
default : return;
}
}
}
이함수를 돌리는데 한번 스위치문 돌렸다가 다시 displaymanu함수가 실행되면 저런 메세지가 나오네요 ㅠㅠ