+ 1
Yes you are able to. Say you have Class A class A { A(){} //constructor void hello() { ... } void myMethod() { here, I can call class A’s method hello just like hello(); or this.hello(); to be more explicit - to say the method is of ‘this’ - but there is no point for inherited methods, say class A inherits from class AA. I can invoke any of AA’s instance methods as long as the class AA declares them as public (visible to all classes) or protected (visible to own and descendant classes). If AA declares methods as private, they cannot be invoked here. } }
31st Mar 2019, 3:14 PM
Jenine