Go, Go, Go
2017년 10월 12일 목요일
[Java] When 'sc.nextLine()' doesn't work after 'sc.nextInt()'
[Solution]
int n = sc.nextInt();
sc.skip("[\\r\\n]+");
for(int i = 0 ; i < n ; i++){
String str = sc.nextLine();
System.out.println(str);
}
댓글 없음:
댓글 쓰기
최근 게시물
이전 게시물
홈
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기