enhanced for loop in java with list code example
Example: enhanced for loop arraylist
// for(dataType var: myArrayList){
// System.out.println(var);
// }
for(int num: numList){
System.out.println(num);
}
// for(dataType var: myArrayList){
// System.out.println(var);
// }
for(int num: numList){
System.out.println(num);
}