读空格隔开字符

1          Scanner cin = new Scanner(new BufferedInputStream(System.in));
2          int a;
3          while (cin.hasNextInt())
4          {
5              a = cin.nextInt();
6            System.out.print(a+" ");
7          }

 

你可能感兴趣的:(字符)