List<String> collection = new ArrayList<String>();
collection.add("Hello");
collection.add("World");
for(String item:collection)
{
System.out.println(item);
}
collection.add("Hello");
collection.add("World");
for(String item:collection)
{
System.out.println(item);
}
No comments:
Post a Comment