java for loop arrays code example
Example 1: lopp array java
For(<DataType of array/List><Temp variable name> : <Array/List to be iterated>){
System.out.println();
//Any other operation can be done with this temp variable.
}
Example 2: for loop in java as long as array
for(i = 0; i < arrayName.length; i++{
//print statement will output current index's value
System.out.println(arrayName[i]);
}