The meaning of 'extends'

June 7th, 2004 by Hen

Nice little tidbit that I just read in Thinking in Java.

I’ve always missed the ‘inherit’ keyword from LPC. ‘extends’ always felt a bit crap as we spend most of our time talking about inheritence, not extension.

Eckel defines inheritence as being a direct child of the superclass, with no new methods and attributes, and extension as being a child of the superclass, but allowed to add new methods and attributes.

A minor point, but it helps me appreciate the ‘extends’ keyword more.

Comments are closed.