+ 1
for(int[] a:x)
how it works??
2 Answers
+ 2
for every element in array a do something. each element in each loop will be saved in variable x. So for example you have array a =(1,2,3,4) and for(int[] a: x ){ System.out.print(x)} will give output 1234