Function overloading
Function overloading is defining multiple callable operations with the same name but different parameter signatures, with behavior selected according to the call.
100 Java Mistakes and How to Avoid Them
A method overload is one of multiple methods with the same name but different parameter lists in a class or interface.
- How it is used
- Prevents unintended Java call binding when overloaded methods, constructors, method references, or boxed numeric arguments obscure the selected signature.
- How deep it goes
- Explains overload selection through focused failures and corrections, without detailing Java's full overload-resolution rules.
- Examples
- Uses `StringBuilder::new` in `computeIfAbsent`, `List<Integer>.remove(0)`, and `process(Object)` alongside typed overload migration.
- What you can do after
- Diagnose/debug with it by exposing target parameters, forcing intended argument types, checking parameter hints, and migrating broad APIs to typed overloads.
Read how 100 Java Mistakes and How to Avoid Them explains function overloading →
Software Design for Python Programmers
Function overloading is providing the same operation through multiple signatures or argument forms with behavior selected according to the call.
- How it is used
- Uses one name for closely related operations that accept different argument counts or datatypes.
- How deep it goes
- Explains naming criteria, Python's replacement behavior, runtime checks, and decorator-based dispatch, stopping short of formal language semantics.
- Examples
- Demonstrates overloaded area calculations, line lengths from points and coordinate containers, the plus operator, and len().
- What you can do after
- Build it from scratch using runtime checks or the multimethod decorator to dispatch related calls by argument form and datatype.
Read how Software Design for Python Programmers explains function overloading →
Object-Oriented Software Design in C++
The definition of multiple functions with the same name but different parameter lists or signatures in a scope.
- How it is used
- Uses one name for closely related operations whose behavior varies with argument types or counts.
- How deep it goes
- Explains signatures, compiler selection, and suitable behaviors through compact C++ examples.
- Examples
- Demonstrates print, draw_circle, search, sqrt, and overloaded operators for arithmetic, strings, and enumerations.
- What you can do after
- Apply function overloading in C++ when related operations need distinct parameter signatures under one name.
Read how Object-Oriented Software Design in C++ explains function overloading →
Related concepts
- JavaScriptcontrasts with · JavaScript is a high-level, dynamically typed, multi-paradigm programming language standardized as ECMAScript and used for web and general-purpose programming.
- default valuealternative to · A default value is a predefined or automatically supplied value used when an expected input, argument, field, or configuration setting is omitted or unspecified.
- multimethodimplemented by · A multimethod is a dispatch mechanism that selects an implementation by applying a dispatch function to multiple arguments, often using their runtime types or values.
- runtime checkuses · A runtime check is a verification performed while a program executes to determine whether a value, condition, or operation satisfies required constraints.
- C++used by · C++ is a statically typed, general-purpose programming language supporting procedural, object-oriented, generic, and low-level systems programming.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


