• Inheritance and polymorphism are powerful language features to develop
extensible and modifiable code.
• Inheritance mechanism is used to share common code among the related classes.
• Inheritance is different from the Java interface, which is used to share
common behavior among unrelated classes.
• The third visibility modifier is the protected modifier.
• If no instances are created from a superclass, then define the superclass as an
abstract class.
• Polymorphic messages tell us that the method executed in response to the
message will vary according to the class to which the object belongs.
• The first statement in a constructor of a subclass must be a call to a
constructor of the superclass. If the required statement is not made explicitly,
then the statement to call the default constructor of the superclass is inserted
automatically by the Java compiler.
• The standard class described or used in this chapter is StringTokenizer.