next()와 nextLine()

rebeca970228 Reply 8 years 34 weeks ago
처음에 p=sc.nextLine(); 이라고 썼더니 t=sc.nextInt();를 받을 때 랑 겹쳐져서 t를 입력하자마자 invalid랑 valid 여부가 나왔는데 p=sc.next();로 고쳐주니까 정상작동을 했어요. 왜그런거죠? 둘의차이가뭔가요?
withcs1 Reply 8 years 34 weeks ago
http://sexy.pe.kr/tc/496