When a sub-class is created using inheritance some of the methods in the super-class might not be suitable. In this case a new method is written in the sub-class with the same name. This method overwrites the super-class method when the for objects instatiated from the sub-class.

See the inheritance page for an example of this.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License