public class ForEachWithArrays2 { public static void main(String[] args) { // These lines use a for-each loop to display // the elements of an array of integers int[] test = new int[] {4, 1, 7, 5}; for (int intValue : test) System.out.println(intValue); } }