Apr-29-2020, 07:18 PM
You could make getMaxX and getMaxY class methods. Then you could call World.getMaxX(). However all instances of World would return the same value because it would be an attribute of the class, not the object.
calling on a method from one class into another class which is not a child
|
|
Messages In This Thread |
calling on a method from one class into another class which is not a child - by NABA - Apr-29-2020, 06:54 PM
RE: calling on a method from one class into another class which is not a child - by deanhystad - Apr-29-2020, 07:02 PM
RE: calling on a method from one class into another class which is not a child - by NABA - Apr-29-2020, 07:10 PM
RE: calling on a method from one class into another class which is not a child - by deanhystad - Apr-29-2020, 07:18 PM
RE: calling on a method from one class into another class which is not a child - by NABA - Apr-29-2020, 07:26 PM
RE: calling on a method from one class into another class which is not a child - by deanhystad - Apr-29-2020, 07:49 PM
|