Core Java

Inheritance

Slide navigation: Forward with space bar, → arrow key, or PgDn. Backwards with ← or PgUp.

.jpg

Copyright © Cay S. Horstmann 2016

Except where otherwise noted, this work is licensed under .svg

Understand and define subclasses

Classes, Superclasses, and Subclasses

Defining Subclasses

Override methods and provide constructors in subclasses

Overriding Methods

Subclass Construction

Polymorphism

inheritance

More about Method Calls

More about Overriding

Understand advanced inheritance concepts in Java

Final Classes and Methods

Casting

Abstract Methods

Abstract Classes

abstractClasses

Protected Access

Work with the Object class and its methods

Object: The Cosmic Superclass

The equals Method

The equals Method in a Subclass

Equality Testing and Inheritance

The hashCode Method

The toString Method

Inheritance and the toString Method

equals

Understand how inheritance shapes Java language features

Generic Array Lists

arrayList

Object Wrappers and Autoboxing

Methods with a Variable Number of Parameters

Enumeration Classes

enums

Use reflection to work with arbitrary objects

The Class Class

Obtaining Class Instances

A Primer on Catching Exceptions

reflection

Analyzing Objects at Runtime

objectAnalyzer

Generic Array Code

Generic Array Code

arrays

Invoking Arbitrary Methods

methods

Java 9 News Flash - Reflection

.png

Reflection

JShell and Arrays

Use inheritance effectively

Design Hints for Inheritance

Design Hints for Inheritance