JAVA基礎学習ノートday 003_01 Scanner構文の使い方
442 ワード
package day02;
//1. package class import java.util.Scanner
import java.util.Scanner;
public class ScannerDemo {
public static void main(String[] args) {
//
Scanner input = new Scanner(System.in);// Scan+ALT+/
int a;
int b;
// , input.nextInt();
a = input.nextInt();
b = input.nextInt();
System.out.println("a+b "+(a+b));
}
}