Section E.14. Overriding Methods

   

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     } } 

   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net