Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Java supports overloading methods and can distinguish between methods with different method signatures. This means that, with some qualifications, methods within a class can have the same name if they have different parameter lists. In method overloading, the determination as to which method is of the method to be invoked at runtime is determined at compile time. This means that even if the runtime type differs for each invocationConsequently, the overloaded method associated with the static type of the object is invoked, even when the runtime type differs for each invocation.

Wiki Markup
Do not introduce ambiguity while overloading (see [MET01-J. Avoid ambiguous uses of overloading]) and use overloaded methods sparingly \[[Tutorials 2010|AA. Bibliography#Tutorials 10]\] as they can make code much less readable.

...