标签:elements sys out lan lin ring div rgs static
Enumeration 接口是 Iterator 迭代器的古老版本(一般不用,作了解)
public class TestEnumeration {
public static void main(String[] args) {
Enumeration enu = new StringTokenizer("ab-c*d-fg", "-");//按“-”来分割
while (enu.hasMoreElements()) {
Object o = enu.nextElement();
System.out.println(o);// ab c*d fg
}
}
}
标签:elements sys out lan lin ring div rgs static
原文地址:http://www.cnblogs.com/chendifan/p/6535713.html