for each
public class ArrayForeach{ public static void main(String []args){ int [][]a={{1,2,3},{4,5,6},{7,8,9},{10,11,12}} ; for(int []row:a) { for(int element:row) System.out.println(element); } } }
public class ArrayForeach{ public static void main(String []args){ int [][]a={{1,2,3},{4,5,6},{7,8,9},{10,11,12}} ; for(int []row:a) { for(int element:row) System.out.println(element); } } }