when does method overloading happens
Answers
Answered by
0
Explanation:
Overloading occurs when two or more methods in one class have the same method name but different parameters. Must have at least two methods by the same name in the class. Must have a different number of parameters. If the number of parameters is the same, then it must have different types of parameters.
Answered by
0
Explanation:
Overloading occurs when two or more methods in one class have the same method name but different parameters.
Overriding occurs when two methods have the same method name and parameters. One of the methods is in the parent class, and the other is in the child class. Overriding allows a child class to provide the specific implementation of a method that is already present in its parent class.
MARK THIS BRAINLIEST AND DROP THANKS
Similar questions
English,
1 month ago
Social Sciences,
3 months ago
English,
3 months ago
CBSE BOARD X,
10 months ago
Social Sciences,
10 months ago