In reading the tutorial 6 "How to access one object from another", in the hitAnAsteroid() method, there is a line of code:
I think I understand that an object variable of type Space is declared and assigned the value returned from getWorld(). What has me somewhat puzzled is the word (Space) in parenthesis. This looks as though the value returned from getWorld() is being typecast as Space.class, but I don't understand why this is necessary so it must mean something else that escapes me.
Space spaceWorld = (Space) getWorld(); // get a reference to the world