What is the difference between inherited methods and public methods?

ratedarv4_ :

I have trouble understanding how an inherited method in a subclass from a superclass differs from a public method in a class which can be used in another class.

Datta2811 :

Please go through the basic OOP concepts, you will understand the difference. Very short answer could be that public methods you can just access where as using inheritance subclasses can modify existing behaviour.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=400652&siteId=1