user100DaysOfCode
CommunityDevTermsResources|Login

Loading

Java Roadmap

Day 28: Method Overloading

In Java, we can implement multiple methods with the same name but with different parameters. This is known as Method Overloading. Add the following methods to the Instructor class:

  • incrementSalary with int percent as parameter and increment the salary by percentage
  • incrementSalary with int percent and int bonus as parameters, and increment the salary by percentage and then add the bonus to salary
<Prev|Next>

Learning Resources |View Complete Plan

Day 28 - Method Overloading

In Java, we can implement multiple methods with the same name but with different parameters. This is known as Method Overloading. Add the following methods to the Instructor class:

  • incrementSalary with int percent as parameter and increment the salary by percentage
  • incrementSalary with int percent and int bonus as parameters, and increment the salary by percentage and then add the bonus to salary
<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