Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Object-Oriented Programming: Inheritance

9. Object-Oriented Programming: Inheritance

Objectives

In this chapter you’ll learn:

  • How inheritance promotes software reusability.

  • The notions of superclasses and subclasses.

  • To use keyword extends to create a class that inherits attributes and behaviors from another class.

  • To use access modifier protected to give subclass methods access to superclass members.

  • To access superclass members with super.

  • How constructors are used in inheritance hierarchies.

  • The methods of class Object, the direct or indirect superclass of all classes in Java.

Say not you know another entirely, till you have divided an inheritance with him.

Johann Kasper Lavater


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial