import java.util.ArrayList; import java.util.Collection; public class Test { public static void main(String[] args) { int [] arr = {1, 2, 3, 4, 5}; for(int i : arr) { System.out.print(i + " "); } System.out.println(); Collection<String> c = new ArrayList<String>(); c.add(new String("AAA")); c.add(new String("BBB")); c.add(new String("CCC")); for(String o : c) { System.out.print(o + " "); } } }