2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by stultuske
0
method(int i){}
method(double d){}
method(float f){}
method(int i, float f){}

overloading methods means creating several methods in the same class with exactly the same name, but with other parameters, doesn't need to be the same number of parameters, but it has to be unique for each method, since, if you have two methods with exactly the same name and exactly the same number and type of paramters, the compiler would never be able to tell which one you need once you call one.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.