user100DaysOfCode
CommunityDevTermsResources|Login

Loading

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
<Prev|Next>

Learning Resources |View Complete Plan

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
<Prev|Next>

Learning Resources |View Complete Plan

      Sponsor Us|Community|Blog|YoutubeCareersContact UsDisclaimerPrivacy PolicyTerms of Service
      Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
      100DaysOfCode@2024