This is a simple foreach loop, it will go through each of the elements in this array.
In this case, the MovingElement will be an array type, mElement will be the current element, and moveElems will be the actual array.
":" divides only two parts
So, in your case, the loop will go through each of the elements in the ArrayList and use the step () method.
source share