-
Notifications
You must be signed in to change notification settings - Fork 0
Home
sowon-dev edited this page May 7, 2021
·
9 revisions
- Season1: 100 Algorithms Challenge
- Saeson2: 30 Algorithms Challenge
- Season1: 2020.12.27 ~ 2021.04.25 (17 times) Every Sunday 11a.m.(KST) on Zoom
- Saeson2: TBD
- next(), nextInt(), nextLine() 차이
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt(); //스페이스 전까지만 입력받은 것을 숫자로 리턴
String n2 = sc.next(); // 스페이스 전까지 입력받은 문자열을 리턴
String n3 = sc.nextLine(); //끝난자리에서 시작(엔터도 포함), Enter를 치기 전까지 쓴 문자열을 모두 리턴한다는 것
System.out.println(n1 +" ," +n2+ " , "+n3);
}
}