Java Reference
In-Depth Information
You should also be careful when creating many methods with the same name. The limita-
tion of method overloading is that you can not use same method name and parameter name
and parameter data type more than once in a class. Otherwise the compiler will get con-
fused even if the return data type for the method you are using is different for each method.
The bottom line is that the method signature should always be different.
We will be learning about method overriding, constructors etc. in the next section on
classes.
Search WWH ::




Custom Search