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

This chapter shows you how to create and implement interfaces in your object-oriented programs. Interfaces offer many of the advantages of the multiple inheritance feature that's available in OOP languages like C++, without all of the complications.

Chapter 8 How to work with interfaces
An introduction to interfaces 262
A simple interface 262
Interfaces compared to abstract classes 264
Some interfaces of the Java API 266
How to work with interfaces 268
How to code an interface 268
How to implement an interface 270
How to inherit a class and implement an interface 272
How to use an interface as a parameter 274
How to use inheritance with interfaces 276
A Product Maintenance application that uses interfaces 278
The class diagram 278
The console 280
The DAOFactory class 282
The ProductTextFile class 282

The ProductMaintApp class

284
How to implement the Cloneable interface 288
A Product class that implements the Cloneable interface 288

A LineItem class that implements the Cloneable interface

290




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.