by Brian Keeton
In this chapter
What Are Classes? Why Use Classes? Classes in Java Declaring a Class Variables ”Defining State Methods ”Defining Behavior Creating an Instance of a Class Referring to Class Elements The Object Class Casting and Converting Reference Types Inner Classes Packages Wrapping the Primitive Types in Classes Using the Standard Mathematical Functions Building a UML Class Diagram Troubleshooting
What Are Classes?
Why Use Classes?
Classes in Java
Declaring a Class
Variables ”Defining State
Methods ”Defining Behavior
Creating an Instance of a Class
Referring to Class Elements
The Object Class
Casting and Converting Reference Types
Inner Classes
Packages
Wrapping the Primitive Types in Classes
Using the Standard Mathematical Functions
Building a UML Class Diagram
Troubleshooting