Java Code:
public class ForeachArray {
  public static void main(String args[]) {
    String[] data = { "Toronto", "Stockholm" };
    for (String s : data) {
      System.out.println(s);
    }
  }
}