int[] numbers = new int[10]; int[] names = new String[]{"John", "Jack"}; int length = names.length; for (String name: names) { System.out.println(name); }