1. Method overloading (overload)
Method name is the same
Different parameter types ( number of parameters and type )
Regardless of return type
2. Method override (Override)--" to achieve polymorphism, only the instance method can achieve polymorphism, static method cannot achieve polymorphic
Subclasses overriding parent class methods
Method name is the same
return type is the same
Same parameters
What are the differences between overrides and overloads? The overload method can change the return value type?
= = "Can change the return value type
A. Overrides and overloads of a method are different manifestations of Java polymorphism.
B. Rewriting is a representation of polymorphism between a parent class and a subclass
C. Overloading is a representation of polymorphism in a class
Java. Abstraction and encapsulation: overriding, overloading