0
Java Override
class Example{ public void function(String S){} public void function(int i){} } Is this function Overriding in Java? Only the input types are different.
2 Réponses
+ 10
This is not overriding, its called function overloading.
In overriding, there is some method in the parent class with its own definition and the same method with same parameters is present in the child class but with different definition.
+ 4
Check this out:
https://www.sololearn.com/learn/Java/2165/?ref=app