String
String 입력받을 때 사용하는 함수
.next( ) : 공백 단위로 문자열 읽는다.
String str = sc.next();
2. nextLine( ) : Enter 단위로 문자열 읽는다. (Enter 입력은 \r\n으로 구성된 두개의 문자이다.)
String str = sc.nextLine();
Last updated
Was this helpful?
String 입력받을 때 사용하는 함수
.next( ) : 공백 단위로 문자열 읽는다.
String str = sc.next();
2. nextLine( ) : Enter 단위로 문자열 읽는다. (Enter 입력은 \r\n으로 구성된 두개의 문자이다.)
String str = sc.nextLine();
Last updated
Was this helpful?