String[] colors = {"red", "green", "blue"}; for (String color : colors) { System.out.println(color); } // Output: // red // green // blue
Click Run to execute this code.