public static void main(String[] args) {
List<String> countries = new ArrayList<String>();
countries.add("China");
countries.add("America");
countries.add("Japan");
Enumeration<String> e = Collections.enumeration(countries);
while (e.hasMoreElements())
System.out.println(e.nextElement());
}
}
输出:
China
America
Japan
把String换成FileInputStream也是如此!
作者: 蒋映辉 时间: 2012-5-7 09:39
public static void main(String[] args) throws IOException {
File file = new File("merge.txt");
// 创建一个集合用于存储流对象
ArrayList<FileInputStream> al = new ArrayList<FileInputStream>();