Method Overloading:
Method overloading means, in java several methods can exist with the same name.
The overloading concept is very useful when we want to extend the functionality of a method.
Rules:
Method Overloading can be possible by changing either :
1) Number of Parameters
2) Data type of Parameters
3) Sequence of data type of Parameters
The method to be invoked is selected based on the number of parameter,type & their sequence, which has to be matched with the method call.
Note:
Methods cannot be overloaded by just changing the return type of the method.
Hey ! Thanks for watching my video..
for more you can also visit my -
twitter: https://twitter.com/rapid_tutor
facebook: https://www.facebook.com/RapidTutor-106765660738888/
Keep Learning Keep Growing with Rapid Tutor..
#MethodOverloading #MethodsInJava #JavaProgramming
Method overloading means, in java several methods can exist with the same name.
The overloading concept is very useful when we want to extend the functionality of a method.
Rules:
Method Overloading can be possible by changing either :
1) Number of Parameters
2) Data type of Parameters
3) Sequence of data type of Parameters
The method to be invoked is selected based on the number of parameter,type & their sequence, which has to be matched with the method call.
Note:
Methods cannot be overloaded by just changing the return type of the method.
Hey ! Thanks for watching my video..
for more you can also visit my -
twitter: https://twitter.com/rapid_tutor
facebook: https://www.facebook.com/RapidTutor-106765660738888/
Keep Learning Keep Growing with Rapid Tutor..
#MethodOverloading #MethodsInJava #JavaProgramming
- Категория
- Язык программирования Java
Комментариев нет.