출처 - Java의 정석 (남궁 성)
1. 화면에 출력하기
- System.out.print();
- System.out.println();
- System.out.printf(); // 지시자(%d, %f, %c, %s, %n)
2. 화면으로부터 입력받기
- import java.util.Scanner;
- Scanner scanner = new Scanner(System.in);
- String input = scanner.nextLine();
- int num = Integer.parseInt(input);
'Java' 카테고리의 다른 글
반복문(for, while) (0) | 2022.09.19 |
---|---|
조건문(if, switch) (0) | 2022.09.16 |
연산자(operator) (0) | 2022.09.15 |
변수(Variable) (0) | 2022.09.14 |
자바(Java)란? (0) | 2022.09.14 |