Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Archives
Today
Total
관리 메뉴

아일

JAVA 입력 받기 본문

언어별/JAVA

JAVA 입력 받기

Aile_I'll 2020. 6. 12. 23:42

1. Scanner

import java.util.Scanner;

Scanner sc = new Scanner(System.in);

//whitespace기준 한단어 

a = sc.next();

//자료형에 맞는 값

b = sc.nextInt();

c = sc.nextDouble();

한번더 써줘야 받을수있음

d = sc.nextLine();

e = sc.nextLine();

 

2. BufferReader

 

 

BufferReader in = new BufferReader(new InputStreamReader(System.in));
 in.readLine();

 

3. 입출력관련 주의사항

 

링크 참조: https://limkydev.tistory.com/170