Check out example codes for "boucles java". It will help you in understanding the concepts better.

Code Example 1

while(/*condition*/){
 //action 
}

do{
 //action  
}while(/*condition*/);

for(int i = 0; /*condition*/; i++){
  
}

String[] array = new String[]{"1","2","3"};
for(String value:array){
  //action
}

Learn ReactJs, React Native from akashmittal.com