scenario: There are two methods in same class with same name with different arguments and different access modifiers. E.g.:
public void m1(int a){}
private void m1(String b){}
is it overloading or not?
Yes - in a word, yes. To quote Oracle's Java tutorial:
This means that methods within a class can have the same name if they have different parameter lists
In other words - the access modifiers are inconsequential to this discussion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With