java基础之输入语句
1.使用Scanner
Scanner sc = new Scanner(System.in);
如果要输入整数,则 int n = sc.nextInt();
String类型的,则String temp = sc.next();
2.使用BufferedReader
BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
String input = br.readLine();