Java As a Programming Platform
The Java “White Paper” Buzzwords
Common Misconceptions about Java
2 THE JAVA PROGRAMMING ENVIRONMENT
Installing the Java Development Kit
Installing the Library Source and Documentation
Installing the Core Java Program Examples
Navigating the Java Directories
Choosing a Development Environment
Using an Integrated Development Environment
Running a Graphical Application
3 FUNDAMENTAL PROGRAMMING STRUCTURES IN JAVA
Increment and Decrement Operators
Relational and boolean
Operators
Mathematical Functions and Constants
Conversions between Numeric Types
Parentheses and Operator Hierarchy
Reading the On-Line API Documentation
Multiple Selections—The switch Statement
Statements That Break Control Flow
Array Initializers and Anonymous Arrays
Introduction to Object-Oriented Programming
The GregorianCalendar
Class of the Java Library
Implicit and Explicit Parameters
Object Destruction and the finalize
Method
Addition of a Class into a Package
Classes, Superclasses, and Subclasses
Preventing Inheritance: Final Classes and Methods
Equality Testing and Inheritance
Compatibility between Typed and Raw Array Lists
Object Wrappers and Autoboxing
Methods with a Variable Number of Parameters
A Primer on Catching Exceptions
Using Reflection to Analyze the Capabilities of Classes
Using Reflection to Analyze Objects at Runtime
Using Reflection to Write Generic Array Code
6 INTERFACES AND INNER CLASSES
Interfaces and Abstract Classes
Use of an Inner Class to Access Object State
Special Syntax Rules for Inner Classes
Are Inner Classes Useful? Actually Necessary? Secure?
Accessing final
Variables from Outer Methods
Displaying Information in a Component
Example: Handling a Button Click
Becoming Comfortable with Inner Classes
Creating Listeners Containing a Single Method Call
Example: Changing the Look and Feel
9 USER INTERFACE COMPONENTS WITH SWING
Swing and the Model-View-Controller Design Pattern
The Model-View-Controller Pattern
A Model-View-Controller Analysis of Swing Buttons
Introduction to Layout Management
Labels and Labeling Components
Checkbox and Radio Button Menu Items
Keyboard Mnemonics and Accelerators
Enabling and Disabling Menu Items
Sophisticated Layout Management
10 DEPLOYING APPLICATIONS AND APPLETS
The Applet HTML Tag and Its Attributes
Use of Parameters to Pass Information to Applets
Accessing Image and Audio Files
Storage of Application Preferences
11 EXCEPTIONS, LOGGING, ASSERTIONS, AND DEBUGGING
The Classification of Exceptions
Rethrowing and Chaining Exceptions
Analyzing Stack Trace Elements
Assertion Enabling and Disabling
Using Assertions for Parameter Checking
Using Assertions for Documenting Assumptions
Changing the Log Manager Configuration
Letting the AWT Robot Do the Work
Who Wants to Be a Generic Programmer?
Definition of a Simple Generic Class
Generic Code and the Virtual Machine
Translating Generic Expressions
Type Parameters Cannot Be Instantiated with Primitive Types
Runtime Type Inquiry Only Works with Raw Types
You Cannot Throw or Catch Instances of a Generic Class
Arrays of Parameterized Types Are Not Legal
You Cannot Instantiate Type Variables
Type Variables Are Not Valid in Static Contexts of Generic Classes
Beware of Clashes After Erasure
Inheritance Rules for Generic Types
Supertype Bounds for Wildcards
Using Class<T>
Parameters for Type Matching
Generic Type Information in the Virtual Machine
Separating Collection Interfaces and Implementation
Collection and Iterator Interfaces in the Java Library
Specialized Set and Map Classes
Converting between Collections and Arrays
Using Threads to Give Other Tasks a Chance
Handlers for Uncaught Exceptions
An Example of a Race Condition
Why the stop
and suspend
Methods Are Deprecated
Efficient Maps, Sets, and Queues
3.145.87.161