Murach's Beginning Java 2, JDK 5
How to work with inheritance

Inheritance is one of the most important features of object-oriented programming. This chapter teaches you how inheritance works, how polymorphism is related to it, and how this all affects the classes you write and use.

Chapter 7 How to work with inheritance
An introduction to inheritance 224
How inheritance works 224
How the Java API uses inheritance 226
How the Object class works 228
How to use inheritance in your applications 230
Basic skills for working with inheritance 232
How to create a superclass 232
How to create a subclass 234
How polymorphism works 236
The Product application 238
The console 238
The ProductApp class 240
The Product, Book, and Software classes 242
The ProductDB class 242
More skills for working with inheritance 246

How to get information about an object's type

246
How to cast objects 248
How to compare objects 250
How to work with the abstract and final keywords 252
How to work with the abstract keyword 252
How to work with the final keyword 254




Murach's Beginning Java 2

Learn more about this book

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.