Online Java Compiler By
JavaTpoint.com
public class ForEachExample { public static void main(String[] args) { int arr[]={12,23,44,56,78}; for(int i:arr){ System.out.println(i); } } }
Output