使用nextInt()等接受输入时必须注意换行符的输入
参考http://stackoverflow.com/questions/19331426/for-loop-does-not-iterate-the-way-i-want
见以下代码:
System.out.print("Enter name:");s.name = sc.nextLine();System.out.print("Enter number:");//解决方法二:s.number = Integer.parseInt(sc.nextLine());