[Solved] Java call a method from object
[ad_1] You have to pass the child object the parents own instance: public class Test { private ObjectClass object; public Test (){ object = new ObjectClass(this); } public void testMethod(){ //does something } } ObjectClass: public class ObjectClass { Test parentInstance; public ObjectClass(Test instance){ parentInstance = instance; } public void callMethod(){ parentInstance.testMethod(); } } [ad_2] … Read more