You are previewing PURE Java™ 2.
O'Reilly logo
PURE Java™ 2

Book Description

Pure Java 2 is a substantial and focused reference for professional Java programmers. This book begins with an accelerated introduction to Java 2 so that you can quickly understand the new concepts and begin developing your own applications. Professional programmers prefer to learn by examining code, so Pure Java 2 also contains hundreds of programming techniques, complete with well-commented code examples that you can immediately use in your own Java programs.

Table of Contents

  1. Copyright
  2. Acknowledgments
  3. About the Author
  4. Tell Us What You Think!
  5. Introduction
  6. CONCEPTUAL REFERENCE
    1. What Is Java?
      1. Java Overview
      2. The Java Virtual Machine
      3. Garbage Collector
      4. The Java 2 SDK
    2. New Features in Java 2
      1. Swing/Java Foundation Classes
      2. The Policy-Based Security Model
      3. RMI Enhancements
      4. JDBC 2.0 Enhancements
    3. Java Program Features
      1. Basic Layout
      2. Names
      3. Punctuation
      4. Required Methods
    4. Data Types
      1. Primitives
      2. Classes
      3. How Objects Are Created by the JVM
      4. Initialization of Data Members
      5. Abstract Classes
      6. Final Classes
      7. Some Important Common Classes
    5. Methods
      1. Method Signatures
      2. Parameter Names
      3. this
      4. Modifiers
      5. Access Modifiers
      6. Other Modifiers
      7. Overloading Methods
      8. Polymorphism: Overriding Methods
    6. Interfaces
      1. An Example from GUI Event-Handling Interfaces
      2. Interface Contents
    7. Syntax
      1. Punctuation
      2. Keywords
      3. Operators
      4. Control Flow
      5. Modifying Control Flow: break and continue
  7. TECHNIQUES REFERENCE
    1. GUI Programming I: Applications
      1. Basic GUI Application Programming
      2. Layout Managers
      3. Absolute Positioning
      4. Leaving Positioning to Layout Managers
      5. Java Foundation Classes
      6. Using Delegation Event Handling
      7. Adapter Classes
      8. Using Drag and Drop in Java
    2. GUI Programming II: Applets
      1. An Applet Overview
      2. Applet Security Considerations
      3. Main Applet Methods
      4. Running Applets
      5. Applet Programming
    3. Exceptions
      1. The Throwable Class
    4. Multithreaded Programming in Java
      1. Thread States
      2. Creating Threads
      3. Primary Thread Methods
      4. Using Synchronization
      5. Avoiding Deadlocks with wait() and notify()
    5. I/O in Java
      1. A Quick Overview of Stream
      2. An Overview of the Main Stream, Reader, and Writer Classes
      3. Using Files in Java
      4. Performing I/O in Java
    6. Reflection
      1. Discovering the Name and Attributes of a Class
      2. Getting Constructor and Method Information with Reflection
      3. Discovering Interface Information
      4. Modifying Data Members and Calling Methods
    7. Java Network Programming
      1. Core Networking Concepts
      2. Working with Host Names and IP Addresses
      3. Creating a TCP Client and Server Application
      4. Using Datagram Packets and UDP Sockets
      5. Working with URLs in Java
    8. RMI
      1. RMI Architecture Overview
      2. Parameters for Remote Methods
      3. Finding Remote Objects
      4. Calling a Remote Object's Methods
      5. Calling a Remote Object with a Remote Object Parameter: Code Examples
      6. Creating a Remote Object from a Client: Remote Activation Code Examples
    9. Java Security
      1. Using Policy-Based Security
      2. Creating a Policy File
      3. Sample Code for Digital Signing
      4. Procedure for Digitally Signing Code
      5. Creating Custom Permissions
      6. Message Digests
    10. JDBC: Java Database Programming
      1. Creating a Database Connection
      2. Using Callable Statements
      3. JDBC 2.0 Techniques
      4. Other Important Points to Remember
    11. Text
      1. Basic Internationalization in a Java Application
      2. Formatting Text
      3. Formatting Numeric Data
      4. Formatting Dates and Times
    12. Utility Classes
      1. The Collection Framework
      2. Collection Interfaces
      3. Collection Implementations
      4. GregorianCalendar
      5. Using Properties
  8. SYNTAX REFERENCE
    1. java.applet
      1. Package Name: java.applet
      2. Interface and Class Details
    2. java.awt
      1. Package Name: java.awt
      2. Package Name: java.awt.datatransfer
      3. Package Name: java.awt.dnd
      4. Package Name: java.awt.event
      5. Package Name: java.awt.font
      6. Package Name: java.awt.geom
      7. Package Name: java.awt.print
      8. java.awt Interface and Class Details
      9. java.awt.datatransfer Interface and Class Details
      10. java.awt.dnd Interface and Class Details
      11. java.awt.event Interface and Class Details
      12. java.awt.print Interface and Class Details
    3. java.beans
      1. Package Name: java.beans
      2. Package Name: java.beans.beancontext
      3. java.beans Interface and Class Details
    4. java.io
      1. Package Name: java.io
      2. Interface and Class Details
    5. java.lang
      1. Interfaces
      2. Classes
      3. Exceptions
      4. Errors
      5. Interface and Class Details
    6. java.lang.reflect
      1. Interfaces
      2. Classes
      3. Interface and Class Details
    7. java.math
      1. Classes
      2. Class Details
    8. java.net
      1. Interfaces
      2. Classes
      3. Exceptions
      4. Interface and Class Details
    9. java.rmi
      1. Interfaces
      2. Classes
      3. Exceptions
      4. Interface and Class Details
    10. java.rmi.server and java.rmi.activation
      1. Package Name: java.rmi.activation
      2. Package Name: java.rmi.server
      3. java.rmi.server Interface and Class Details
      4. java.rmi.activation Class Details
    11. java.security
      1. Package Name: java.security
      2. Package Name: java.security.cert
      3. java.security.cert Interface and Class Details
      4. java.security.cert Class Details
    12. java.sql
      1. Interfaces
      2. Classes
      3. Exceptions
      4. Interface and Class Details
    13. java.text
      1. Interfaces
      2. Classes
      3. Exception
      4. Class Details
    14. java.util
      1. Interfaces
      2. Classes
      3. Exceptions
      4. Interface and Class Details
    15. java.util.jar
      1. Classes
      2. Exceptions
      3. Class Details
  9. Index