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

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Content Index

Content Page # 30

Overriding methods

As well as a subclass adding new attributes and operations for the specialised class it represents, it may be that the subclass needs to perform some different actions for an operation already defined and inherited by a superclass. In such cases a new operation is defined in the subclass, that overrides the method defined by one of its superclasses.

 

basicline.gif (169 bytes)

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