Definitions for "Extends" Add To Word List
Login or Register  | Word Lists | Search History

Keyword indicating that a class inherits from another class.
Helpful?           0
indicates inheritance of a super- or parent class. In the following example, Brass inherits the properties of Instrument: class Instrument { public void play( Note n ) { System.out.println("Ta-daaaaaaa!"); } public String what() { return "Instrument"; } } class Brass extends Instrument { public void play( Note n ) { System.out.println("Brass.play() " + n + " loud and brash"); } public String what() { return "Brass";
Helpful?           0
Class X extends class Y to add functionality, either by adding fields or methods to class Y, or by overriding methods of class Y. An interface extends another interface by adding methods. Class X is said to be a subclass of class Y. See also derived from.
Helpful?           0
form a subclass, i.e. give extra methods / vars
Helpful?           0