int[][] arr={{12,44,22},{12,566,33,22,11}}; for (int[] i : arr){ for (int j : i){ System.out.println(j); } }