java - method overloading in same class with different params name -
i have method in super class
protected int discount(int amount)
and method in subclass
protected int discount(int amount1)
is method in subclass going overload or not???
no, method overloading works if have different type or number of arguments. variable names don't matter
Comments
Post a Comment