ArrayList<String> al = new ArrayList<String>();
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
String st = sc.next();
if("quit".equals(st)){
break;
}
al.add(st);
}
Iterator<String> it = al.iterator();
System.out.println(al.size());
String c = null;
while(it.hasNext()) { //用debug测试这里一直为true ,我猜想是add方法出了问题 牛人求指点
c = c+it.hasNext();
}
System.out.println(c);
//
}
}