Why would you extend a class Java?

You extend a class when you want the new class to have all the same features of the original, and something more . The child class may then either add new functionalities, or override some funcionalities of the parent class.

Sizin İçin Seçtik  Do objects have attributes Java?

Leave a Reply

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