Java Roadmap

Day 29: Method Overriding

In Java, the child class can also have the same method as the parent class. This is known as Method Overriding. Add the following method to the Instructor class:

  • getFullname() method which returns the full name of the Instuctor along with a prefix "Prof." (i.e Prof. Firstname Lastname). This method overrides the getFullname method defined of the User class

Sponsor Us|Community|Blog|Youtube
Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
100DaysOfCode@2024