Overloading Cheatsheet

Written by admin on . Posted in Cheatsheet

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Email to a friend 0 Flares ×
  • Using the same method name but with different argument is called overloading.
  • Constructors can also be overloaded
  • Overloaded methods must have different argument set.
  • Overloaded methods may have different return type.
  • Overloaded methods may have different access modifier.
  • Overloaded methods may throw different exception broader or narrow no restriction
  • Methods from super class can also be overloaded in subclass.
  • Polymorphism applies to overriding not Overloading
  • Which overloaded method will be invoked is decided on compile time on the basis of reference type.

Trackback from your site.

Leave a comment

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Email to a friend 0 Flares ×