E.14. Overriding Methods
Overriding a method means defining a method in a subclass that has the same signature as the method of the same signature in the superclass.
class Car extends Vehicle { // override the move method defined in superclass void move() { // define move specific only to Car } }
Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.