what is function overloading ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is function overloading ?

27th Oct 2016, 9:50 PM
samanth kumar
samanth kumar - avatar
2 Answers
+ 5
It's when you declare several functions with the same name, but different parameters. When calling an overloaded function, the right one is executed based on the number and types of the arguments.
28th Oct 2016, 12:21 AM
Zen
Zen - avatar
+ 1
a good example are the constructor can have various types with only change in parameters.
28th Oct 2016, 6:42 AM
Everson Souza de Araujo
Everson Souza de Araujo - avatar