Java in a Nutshell

Fifth Edition März 2005
ISBN 978-0-596-00773-7
Seiten 1254
EUR43.00, SFR71.90


Weitere Informationen zu diesem Buch

Inhaltsverzeichnis | Index | Probekapitel | Kolophon | Rezensionen |
Download der Beispiele |


Inhaltsverzeichnis

	

Preface

I. Introducing Java

1. Introduction
     What Is Java?
            The Java Programming Language
            The Java Virtual Machine
            The Java Platform
            Versions of Java
     Key Benefits of Java
            Write Once, Run Anywhere
            Security
            Network-Centric Programming
            Dynamic, Extensible Programs
            Internationalization
            Performance
            Programmer Efficiency and Time-to-Market
     An Example Program
            Compiling and Running the Program
            Analyzing the Program
            Exceptions

2. Java Syntax from the Ground Up
     Java Programs from the Top Down
     Lexical Structure
            The Unicode Character Set
            Case-Sensitivity and Whitespace
            Comments
            Reserved Words
            Identifiers
            Literals
            Punctuation
     Primitive Data Types
            The boolean Type
            The char Type
            Strings
            Integer Types
            Floating-Point Types
            Primitive Type Conversions
     Expressions and Operators
            Operator Summary
            Arithmetic Operators
            String Concatenation Operator
            Increment and Decrement Operators
            Comparison Operators
            Boolean Operators
            Bitwise and Shift Operators
            Assignment Operators
            The Conditional Operator
            The instanceof Operator
            Special Operators
     Statements
            Expression Statements
            Compound Statements
            The Empty Statement
            Labeled Statements
            Local Variable Declaration Statements
            The if/else Statement
            The switch Statement
            The while Statement
            The do Statement
            The for Statement
            The for/in Statement
            The break Statement
            The continue Statement
            The return Statement
            The synchronized Statement
            The throw Statement
            The try/catch/finally Statement
            The assert Statement
     Methods
            Defining Methods
            Method Modifiers
            Declaring Checked Exceptions
            Variable-Length Argument Lists
            Covariant Return Types
     Classes and Objects Introduced
            Defining a Class
            Creating an Object
            Using an Object
            Object Literals
     Arrays
            Array Types
            Creating and Initializing Arrays
            Using Arrays
            Multidimensional Arrays
     Reference Types
            Reference vs. Primitive Types
            Copying Objects
            Comparing Objects
            Terminology: Pass by Value
            Memory Allocation and Garbage Collection
            Reference Type Conversions
            Boxing and Unboxing Conversions
     Packages and the Java Namespace
            Package Declaration
            Globally Unique Package Names
            Importing Types
            Importing Static Members
     Java File Structure
     Defining and Running Java Programs
     Differences Between C and Java

3. Object-Oriented Programming in Java
     Class Definition Syntax
     Fields and Methods
            Field Declaration Syntax
            Class Fields
            Class Methods
            Instance Fields
            Instance Methods
            Case Study: System.out.println( )
     Creating and Initializing Objects
            Defining a Constructor
            Defining Multiple Constructors
            Invoking One Constructor from Another
            Field Defaults and Initializers
     Destroying and Finalizing Objects
            Garbage Collection
            Memory Leaks in Java
            Object Finalization
     Subclasses and Inheritance
            Extending a Class
            Superclasses, Object, and the Class Hierarchy
            Subclass Constructors
            Constructor Chaining and the Default Constructor
            Hiding Superclass Fields
            Overriding Superclass Methods
     Data Hiding and Encapsulation
            Access Control
            Data Accessor Methods
     Abstract Classes and Methods
     Important Methods of java.lang.Object
            toString()
            equals( )
            hashCode( )
            Comparable.compareTo( )
            clone()
     Interfaces
            Defining an Interface
            Implementing an Interface
            Interfaces vs. Abstract Classes
            Marker Interfaces
            Interfaces and Constants
     Nested Types
            Static Member Types
            Nonstatic Member Classes
            Local Classes
            Anonymous Classes
            How Nested Types Work
     Modifier Summary
     C++ Features Not Found in Java

4. Java 5.0 Language Features
     Generic Types
            Typesafe Collections
            Understanding Generic Types
            Type Parameter Wildcards
            Writing Generic Types and Methods
            Generics Case Study: Comparable and Enum
     Enumerated Types
            Enumerated Types Basics
            Using Enumerated Types
            Advanced Enum Syntax
            The Typesafe Enum Pattern
     Annotations
            Annotation Concepts and Terminology
            Using Standard Annotations
            Annotation Syntax
            Annotations and Reflection
            Defining Annotation Types
            Meta-Annotations

5. The Java Platform
     Java Platform Overview
     Text
            The String Class
            The Character Class
            The StringBuffer Class
            The CharSequence Interface
            The Appendable Interface
            String Concatenation
            String Comparison
            Supplementary Characters
            Formatting Text with printf() and format( )
            Logging
            Pattern Matching with Regular Expressions
            Tokenizing Text
            StringTokenizer
     Numbers and Math
            Mathematical Functions
            Random Numbers
            Big Numbers
            Converting Numbers from and to Strings
            Formatting Numbers
     Dates and Times
            Milliseconds and Nanoseconds
            The Date Class
            The Calendar Class
            Formatting Dates and Times
     Arrays
     Collections
            The Collection Interface
            The Set Interface
            The List Interface
            The Map Interface
            The Queue and BlockingQueue Interfaces
            Collection Wrappers
            Special-Case Collections
            Converting to and from Arrays
            Collections Utility Methods
            Implementing Collections
     Threads and Concurrency
            Creating, Running, and Manipulating Threads
            Making a Thread Sleep
            Running and Scheduling Tasks
            Exclusion and Locks
            Coordinating Threads
            Thread Interruption
            Blocking Queues
            Atomic Variables
     Files and Directories
            RandomAccessFile
     Input/Output with java.io
            Reading Console Input
            Reading Lines from a Text File
            Writing Text to a File
            Reading a Binary File
            Compressing Data
            Reading ZIP Files
            Computing Message Digests
            Streaming Data to and from Arrays
            Thread Communication with Pipes
     Networking with java.net
            Networking with the URL Class
            Working with Sockets
            Secure Sockets with SSL
            Servers
            Datagrams
            Testing the Reachability of a Host
     I/O and Networking with java.nio
            Basic Buffer Operations
            Basic Channel Operations
            Encoding and Decoding Text with Charsets
            Working with Files
            Client-Side Networking
            Server-Side Networking
            Nonblocking I/O
     XML
            Parsing XML with SAX
            Parsing XML with DOM
            Transforming XML Documents
            Validating XML Documents
            Evaluating XPath Expressions
     Types, Reflection, and Dynamic Loading
            Class Objects
            Reflecting on a Class
            Dynamic Class Loading
            Dynamic Proxies
     Object Persistence
            Serialization
            JavaBeans Persistence
     Security
            Message Digests
            Digital Signatures
            Signed Objects
     Cryptography
            Secret Keys
            Encryption and Decryption with Cipher
            Encrypting and Decrypting Streams
            Encrypted Objects
     Miscellaneous Platform Features
            Properties
            Preferences
            Processes
            Management and Instrumentation

6. Java Security
     Security Risks
     Java VM Security and Class File Verification
     Authentication and Cryptography
     Access Control
            Java 1.0: The Sandbox
            Java 1.1: Digitally Signed Classes
            Java 1.2: Permissions and Policies
     Security for Everyone
            Security for System Programmers
            Security for Application Programmers
            Security for System Administrators
            Security for End Users
     Permission Classes

7. Programming and Documentation Conventions
     Naming and Capitalization Conventions
     Portability Conventions and Pure Java Rules
     Java Documentation Comments
            Structure of a Doc Comment
            Doc-Comment Tags
            Inline Doc Comment Tags
            Cross-References in Doc Comments
            Doc Comments for Packages
     JavaBeans Conventions
            Bean Basics
            Bean Classes
            Properties
            Indexed Properties
            Bound Properties
            Constrained Properties
            Events

8. Java Development Tools
     apt
     extcheck
     jarsigner
     jar
     java
     javac
     javadoc
     javah
     javap
     javaws
     jconsole
     jdb
     jinfo
     jmap
     jps
     jsadebugd
     jstack
     jstat
     jstatd
     keytool
     native2ascii
     pack200
     policytool
     serialver
     unpack200

II. API Quick Reference

How to Use This Quick Reference

9. java.io

10. java.lang and Subpackages

11. java.math

12. java.net

13. java.nio and Subpackages

14. java.security and Subpackages

15. java.text

16. java.util and Subpackages

17. javax.crypto and Subpackages

18. javax.net and javax.net.ssl

19. javax.security.auth and Subpackages

20. javax.xml and Subpackages

21. org.w3c.dom

22. org.xml.sax and Subpackages

Class, Method, and Field Index

Index


Zurück zu Java in a Nutshell


Themen

Buchreihen

Special Interest

International Sites

O'Reilly China O'Reilly France O'Reilly USA O'Reilly Japan O'Reilly Taiwan