Method Overloading in Java

When two or more then two methods sharing same name within the same class, having different type of parameters or different number of parameters. This is known as method overloading.

Ambiguous Invocation

It’s possible that there are two or more possible matches for a method invocation where compiler unable to determine the most specific choice. This is known as ambiguous invocation and cause compilation error.

 

Comments

  1. Reply

    • By Gul

      Reply

  2. Reply

    • By Gul

      Reply

  3. Reply

  4. Reply

  5. Reply

Leave a Reply

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