Add new comment

Specialisation

Specialisation allows new classes, called subclasses, to be constructed from existing classes, the superclasses.

The subclass inherits all of the instance variables and instance methods of the its superclass. It can then use these and add further methods and variables as well as overriding the existing methods to create a more specialised class.

Specialisation aids code re-use, the new classes don't have to rewrite existing methods if they meet their purpose.

Constructors are not members so are not inherited by subclasses.

Private members can not be accessed by subclasses - they are still inherited howevre and can be accessed by inner classes.

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.