您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Content Index

Content Page # 28

Inheritance

A significant strength of object technology is the ability to reuse classes and objects that have been previously defined. One way this is possible is when a new class needs to be modeled that is an extension (or specialization) of some class that has already been modeled (and perhaps implemented). A class that acts as a ‘parent’ for a more specialized class is called a superclass.

A class defined in terms of an existing class only needs to define any new (or different) attributes or operations -- by default it will inherit all the attributes and operations from its superclass.

 

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg