Scanner 예제
import java.util.Scanner;
public class ScannerTest {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
System.out.println("정수 두개를 입력하면 덧셈 결과를 출력하세요.");
int i = keyboard.nextInt();
int j = keyboard.nextInt();
System.out.println("덧셈 결과 : "+i+j);
String a = keyboard.next();
String b = keyboard.next();
System.out.println("정수 덧셈 결과"+(a+b));
}
}