Murach's Beginning Java 2, JDK 5
How to define and use classes
Once you know how to use classes from the Java API, this chapter
gets you started creating your own classes. Then, chapters 7-9 build
on these basics to give you a complete set of object-oriented programming
skills.
|
|
|
|
How classes can be used to structure
an application |
178 |
|
How encapsulation works |
180 |
|
The relationship between a class and
its objects |
182 |
|
|
The code for the Product class |
184 |
|
How to code instance variables |
186 |
|
How to code constructors |
188 |
|
How to code methods |
190 |
|
How to overload methods |
192 |
|
How to use the this keyword |
194 |
|
|
How to create an object |
196 |
|
How to call the methods of an object |
198 |
|
How primitive types and reference types
are passed to a method |
200 |
|
A ProductDB class that creates a Product
object |
202 |
|
A ProductApp class that uses a Product
object |
204 |
|
|
How to code static fields and methods |
206 |
|
How to call static fields and methods |
208 |
|
How to code a static initialization
block |
210 |
|
When to use static fields and methods |
210 |
|
|
The console |
212 |
|
The classes used by the Line Item application |
212 |
|
The LineItemApp class |
214 |
|
The Validator class |
214 |
|
The LineItem class |
218 |
|
 |
|
|
|
|
© Copyright 1998-2008 Mike
Murach & Associates, Inc. All rights reserved.
|