Murach's Beginning Java 2, SDK 1.4

This chapter shows how to work with inheritance, interfaces, and other object-oriented features of Java such as abstract and final classes and methods.

Chapter 5 How to work with inheritance and interfaces
How to work with inheritance 150
An introduction to inheritance 150
How to code a class that inherits the BookOrder class 152
How to code a class that inherits the JFrame class 154
What you should know about polymorphism 154
How to work with the Object class 156
The methods of the Object class 156
How to cast objects 158
How to override the toString method 160
How to override the equals method 162
How to use the Class class to get information about an Object object 164
More skills for coding classes and methods 166
How to code a method that throws an exception 166
How to work with abstract classes and methods 168
How to work with final classes and methods 170
How to work with access modifiers 172
How to use the this keyword 174
How primitive types and objects are passed to a method 176
How to work with interfaces 180
An introduction to interfaces 180
How to code an interface 182
How to implement an interface 184
How to use an interface as an argument 186
How to implement the Cloneable interface 188
How to code classes that are closely related 190
How to code more than one class per file 190
An introduction to nested classes 192
Perspective 194
t




Murach's Beginning Java 2

Learn more about this book

Add this book to your cart


See the Java 1.5 edition