---
title: "What is method overloading?"  
description: "What is method overloading?"  
author: "Shikhar Arora"  
published: 2019-12-06  
canonical: https://answers.mindstick.com/qa/92490/what-is-method-overloading  
category: "programming language"  
tags: ["c#", ".net programming"]  
reading_time: 2 minutes  

---

# What is method overloading?

What is [method overloading](https://www.mindstick.com/forum/127/method-overloading)

## Answers

### Answer by Harshal Vispute

**[Method](https://www.mindstick.com/articles/23411/the-most-effective-method-to-find-the-perfect-small-business-phone-system-for-your-business) Overloading** occurs when a class has many methods with the same name but **distinct parameters** . When we just need to do one operation, having the methods titled the same helps the program's readability. \
If you define the method as **a(int**, **int)** for two parameters and **b(int**, **int**, **int)** for three parameters, it may be difficult for you and other programmers to grasp the behavior. \
**Overloading** allows various methods to have the same name but different signatures, with the signature differing depending on the number of input arguments, the kind of input parameters, or both. **Compile**-**time** (**or static**) **polymorphism** is linked to overloading. \
If the parameters of two or more methods in **Java** differ, they can have the same name (different number of parameters, different types of parameters, or both). Overloaded methods are the term for these types of methods, and method overloading is the term for this functionality. \
**Overloading methods** are a **better technique** to achieve this goal. One of the overloaded methods is then called, **depending** on the **argument** given. This contributes to the program's readability. \
If two or more methods in the same class take distinct parameters, they can have the same name. Method overloading is the term for this capability. \
**Overloading** a method can be accomplished in one of two ways:

- Increasing or decreasing the number of arguments
- Changing the data type of arguments is another option.

If we merely modify the return type of methods, it is not method overloading. Differences in the number of parameters must exist.\


---

Original Source: https://answers.mindstick.com/qa/92490/what-is-method-overloading

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
