public class X { void f() { String[] array = new String[]{"foo", "bar", "baz"}; for (String content : array) { System.out.println(content); } } }