Check out example codes for "boucle for avec un tableau java". It will help you in understanding the concepts better.

Code Example 1

int tab[] = {1,2,3,4};
for (int i : tab) {
  systeme.out.println(i); //fct to print with eclipse
}
//console : 
1
2
3
4
//same as
for (int i = 0; i++; i < tab.lenght) {
    systeme.out.println(i); //fct to print with eclipse
}

Learn ReactJs, React Native from akashmittal.com