读空格隔开字符

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          }

 

posted on 2014-03-06 14:14  wf110  阅读(235)  评论(0编辑  收藏  举报