What is the name of the technique where multiple methods share the same name but have different parameters?

The story behind the answer

The technique where multiple methods share a name but use different parameter lists is called method overloading.

Overloaded methods provide one conceptual operation with several ways to accept input. For example, a Java class might define `draw(String)`, `draw(int)`, and `draw(double)`. The compiler chooses the appropriate version by examining the number, types, and compile-time types of the arguments.

A common mix-up is confusing overloading with overriding. Overloading usually occurs within a class hierarchy when methods have different signatures and is resolved primarily at compile time. Overriding occurs when a subclass supplies a new implementation with the same signature as an inherited method; instance-method selection then happens at runtime through dynamic dispatch.

Return type alone cannot distinguish overloaded methods. Two methods with identical names and parameter types cannot differ only by returning `int` versus `String`. Java method signatures are based on the method name and parameter types, not the return type or parameter names.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: