Hello everyone,
I recently found some code that helps me call a method from another class.
The class would be the Pins class, and every time this set of instructions were carried out, a new row of pins would be created. The code works perfectly, however I would like to understand why it works the way it is. I am not sure if I need a for loop at the top, but I am not sure what else will work. I need to add comments into my work for my school assessment, and to do that I need to understand why this code works.
for (Object obj : getWorld().getObjects(Pins.class)) { Pins pins = (Pins) obj; pins.newRow(); }