⽅法 1:通过Scanner Scanner input = new Scanner(System.in); String s = input.nextLine(); input.close(); ⽅法 2:通过BufferedReader BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String s = input.readLine(); Post Views: 21
留言