What is overriding ?
In : BCA Subject : Java ProgrammingSo long as a class and its methods are not marked final, a subclass can declare a method with the same signature and its own implementation. A typical example is the String toString() method, which is declared in the Object class. All objects implicitly inherit this method. The default implementation is to output the class name combined with its hash code in hexadecimal. The String class overrides the toString() method to give a Unicode representation of string content of the object. Any other object may override toString() with its own method body, to return its own custom output.