OpenStax CNX

You are here: Home » Content » Java OOP: Inheritance, Part 1

About: Java OOP: Inheritance, Part 1

Module by: R.G. (Dick) Baldwin. E-mail the author

View the content: Java OOP: Inheritance, Part 1


Name: Java OOP: Inheritance, Part 1
ID: m44193
Language: English (en)
Summary: Baldwin shows you how to extend an existing class to create a new class. The new class is the blueprint for a new type. This is the mechanism for class inheritance in Java. Inheritance provides a formal mechanism for code reuse.
Subject: Science and Technology
Keywords: abstract class, abstract method, assignment compability, behavior, casting, class, class method, class variable, constructor, encapsulation, extends, final, implements, inheritance, inner class, instance, instance method, instance variable, instantiate, interface, Java, method, method overloading, method overriding, object, object-oriented programming, OOP, polymorphism, primitive type, public, reference, reference type, signature, state, static initializer block, subclass, superclass, toString method, variable, void
License: Creative Commons Attribution License CC-BY 3.0

Authors: R.G. (Dick) Baldwin (
Copyright Holders: R.G. (Dick) Baldwin (
Maintainers: R.G. (Dick) Baldwin (

Latest version: 1.1 (history)
First publication date: Jun 8, 2012 12:24 am -0500
Last revision to module: Jul 27, 2012 4:05 pm -0500


PDF: m44193_1.1.pdf PDF file, for viewing content offline and printing. Learn more.
XML: m44193_1.1.cnxml XML that defines the structure and contents of the module, minus any included media files. Can be reimported in the editing interface. Learn more.

Version History

Version: 1.4 Mar 30, 2014 4:07 pm -0500 by R.G. (Dick) Baldwin

Version: 1.3 Jan 1, 2013 10:58 pm -0600 by R.G. (Dick) Baldwin

Version: 1.2 Dec 12, 2012 7:25 am -0600 by R.G. (Dick) Baldwin
Update title

Version: 1.1 Jul 27, 2012 4:05 pm -0500 by R.G. (Dick) Baldwin Currently viewing this version.
Update metadata

How to Reuse and Attribute This Content

If you derive a copy of this content using a OpenStax-CNX account and publish your version, proper attribution of the original work will be automatically done for you.

If you reuse this work elsewhere, in order to comply with the attribution requirements of the license (CC-BY 3.0), you must include

  • the authors' names: Richard Baldwin
  • the title of the work: Java OOP: Inheritance, Part 1
  • the OpenStax-CNX URL where the work can be found:

See the citation section below for examples you can copy.

How to Cite and Attribute This Content

The following citation styles comply with the attribution requirements for the license (CC-BY 3.0) of this work:

American Chemical Society (ACS) Style Guide:

Baldwin, R. Java OOP: Inheritance, Part 1, OpenStax-CNX Web site., Jul 27, 2012.

American Medical Assocation (AMA) Manual of Style:

Baldwin R. Java OOP: Inheritance, Part 1 [OpenStax-CNX Web site]. July 27, 2012. Available at:

American Psychological Assocation (APA) Publication Manual:

Baldwin, R. (2012, July 27). Java OOP: Inheritance, Part 1. Retrieved from the OpenStax-CNX Web site:

Chicago Manual of Style (Bibliography):

Baldwin, Richard. "Java OOP: Inheritance, Part 1." OpenStax-CNX. July 27, 2012.

Chicago Manual of Style (Note):

Richard Baldwin, "Java OOP: Inheritance, Part 1," OpenStax-CNX, July 27, 2012,

Chicago Manual of Style (Reference, in Author-Date style):

Baldwin, R. 2012. Java OOP: Inheritance, Part 1. OpenStax-CNX, July 27, 2012.

Modern Languages Association (MLA) Style Manual:

Baldwin, Richard. Java OOP: Inheritance, Part 1. OpenStax-CNX. 27 July 2012 <>.