define the term overloading in java
Answers
Answered by
3
Overloading in Java is the ability to define more than one method with the same name in a class. The compiler is able to distinguish between the methods because of their method signatures.
Answered by
1
Overloading in simple terms creating multiple methods with same name but with different parameters. This feature of OOPs allows to group number of methods doing identical work but with different set of parameters / different types of parameters.
Example-
void add(int a, int b);
void add(int a, float b);
void add(int a, int b, int c);
int a=10;
float f=10.56f;
String s=”Ayush";
print(a); print(f);print (s);
Similar questions
English,
7 months ago
Math,
7 months ago
Social Sciences,
7 months ago
Science,
1 year ago
English,
1 year ago
Social Sciences,
1 year ago