You need to sign in to do that
Don't have an account?
James L.
For "each" loop follows the order as for (integer i=0; i< xx, i++) ?
Integer[] arr = new Integer[] {3, 31,6,9};
loop 1
for (Integer tmp: arr) {
}
lopp2
for (Integer i=0; i < arr.size();i++) {
Integer tmp = arr[i]
}
Will those 2 loop follow the same order when iterating the array ?
Yes. when you define an array in that format, its nothing but a list collection, which is ordered.