In what way does Java employ inheritance?

The idea behind inheritance in Java is that you can create new classes that are built upon existing classes . When you inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can add new methods and fields in your current class also.

Sizin İçin Seçtik  What is constructor overloading explain with example?

Leave a Reply

Your email address will not be published. Required fields are marked *