Overloading vs Overriding
Java permits a class to replace (or override) a method that it has inherited. A subclass can define a method with the SAME signature as a superclass method.
Two methods have the same name but DIFFERENT signatures — the parameter types and/or the number of parameters are different.
public StringBuilder append (int a); public StringBuilder append (String s); public StringBuilder append (int a, int b);
A method in the subclass has the SAME signature as a method in the superclass.
Calling An Overridden Method Within a subclass definition, you can call the superclass method with the “super” reference.
Java is an object-oriented programming language. It was released by “SUN MicroSystems” in June 1995. Java is popular for it’s “Write Once, plateformRun Everywhere” feature. This feature enables a Java programmer written on a platform to execute any platform.