The Java Programming Language, 3/e
暫譯: Java 程式語言(第三版)

Ken Arnold, James Gosling, David Holmes

  • 出版商: Addison Wesley
  • 出版日期: 2000-06-05
  • 售價: $1,880
  • 貴賓價: 9.5$1,786
  • 語言: 英文
  • 頁數: 704
  • 裝訂: Paperback
  • ISBN: 0201704331
  • ISBN-13: 9780201704334
  • 相關分類: Java 程式語言
  • 已過版

買這商品的人也買了...

商品描述


Description

This is the definitive Java book written by the inventors of the language. Thoroughly revised from start to finish, this new edition describes the newest version of the Java programming language, version 1.3 of the Java 2 platform Standard Edition. More than just API updates, this third edition has been restructured to give more in-depth treatment of the newer language features, as well as informative examples on using the new core classes like the collections and internationalization packages.

Direct from the creators of the Java™ programming language, this Third Edition provides unique insights into why and how the language was designed and intended to be used. More advanced students will find this new edition to be a valuable reference, and will gain new insights into the subtleties of the language. Beginning and intermediate students will benefit from the valuable examples and clear explanations of language and library features.

Back to Top


Appropriate Courses

Java--Intermediate Programming.

Back to Top


Table Of Contents

1. A Quick Tour.
Getting Started.
Variables.
Comments in Code.
Named Constants.
Unicode Characters.
Flow of Control.
Classes and Objects.
Creating Objects.
Static or Class Fields.
The Garbage Collector.

Methods and Parameters.
Invoking a Method.
The this Reference.
Static or Class Methods.

Arrays.
String Objects.
Extending a Class.
Invoking Methods from the Superclass.
The Object Class.
Type Casting.

Interfaces.
Exceptions.
Packages.
The Java Platform.
Other Topics Briefly Noted.

2. Classes and Objects.
A Simple Class.
Class Members.
Class Modifiers.

Fields.
Field Initialization.
Static Fields.
final Fields.

Access Control.
Creating Objects.
Construction and Initialization.
Constructors.
Initialization Blocks.
Static Initialization.

Methods.
Static Methods.
Method Invocations.
Method Execution and Return.
Parameter Values.
Using Methods to Control Access.

This.
Overloading Methods.
The main Method.
Native Methods.

3. Extending Classes.
An Extended Class.
Constructors in Extended Classes.
Constructor Order Dependencies.

Inheriting and Redefining Members.
Overriding.
Hiding Fields.
Accessing Inherited Members.
Accessibility and Overriding.
Hiding Static Members.
The super Keyword.

Type Compatibility and Conversion.
Compatibility.
Explicit Type Casting.
Testing for Type.

What protected Really Means.
Marking Methods and Classes final.
Abstract Classes and Methods.
The Object Class.
Cloning Objects.
Strategies for Cloning.
Correct Cloning.
Shallow versus Deep Cloning.

Extending Classes: How and When.
Designing a Class to Be Extended.
Designing an Extensible Framework.

Single Inheritance versus Multiple Inheritance.

4. Interfaces.
A Simple Interface Example.
Interface Declarations.
Interface Constants.
Interface Methods.
Interface Modifiers.

Extending Interfaces.
Inheriting and Hiding Constants.
Inheriting, Overriding, and Overloading Methods.

Working with Interfaces.
Implementing Interfaces.
Using an Implementation.

Marker Interfaces.
When to Use Interfaces.

5. Nested Classes and Interfaces.
Static Nested Types.
Static Nested Classes.
Nested Interfaces.

Inner Classes.
Accessing Enclosing Objects.
Extending Inner Classes.
Inheritance, Scoping, and Hiding.

Local Inner Classes.
Anonymous Inner Classes.
Inheriting Nested Types.
Nesting in Interfaces.
Modifiable Variables in Interfaces.

Implementation of Nested Types.

6. Tokens, Operators, and Expressions.
Lexical Elements.
Character Set.
Comments.
Tokens.
Identifiers.
Keywords.

Types and Literals.
Reference Literals.
Boolean Literals.
Character Literals.
Integer Literals.
Floating*Point Literals.
String Literals.
Class Literals.

Variables.
Field and Local Variable Declarations.
Parameter Variables.
final Variables.

Array Variables.
Array Modifiers.
Arrays of Arrays.
Array Initialization.
Arrays and Types.

The Meanings of Names.
Arithmetic Operations.
Integer Arithmetic.
Floating*Point Arithmetic.
Strict and non*Strict Floating*Point Arithmetic.

General Operators.
Increment and Decrement Operators.
Relational and Equality Operators.
Logical Operators.
instanceof.
Bit Manipulation Operators.
The Conditional Operator ?:.
Assignment Operators.
String Concatenation Operator.
new.

Expressions.
Order of Evaluation.
Expression Type.
Implicit Type Conversions.
Explicit Type Casts.
String Conversions.

Member Access.
Finding the Right Method.

Operator Precedence and Associativity.

7. Control Flow.
Statements and Blocks.
if-else.
switch.
while and do-while.
for.
Labels.
break.
continue.
return.
What, No goto?

8. Exceptions.
Creating Exception Types.
throw.
Transfer of Control.
Asynchronous Exceptions.

The throws Clause.
throws Clauses and Method Overriding.
throws Clauses and Native Methods.

try, catch, and finally.
finally.

When to Use Exceptions.

9. Strings.
Basic String Operations.
String Comparisons.
String Literal Equivalence.

Utility Methods.
Making Related Strings.
String Conversions.
Strings and char Arrays.
Strings and byte Arrays.
Character Encodings.

The StringBuffer Class.
Modifying the Buffer.
Getting Data Out.
Capacity Management.


10. Threads.
Creating Threads.
Using Runnable.
Synchronization.
synchronized Methods.
Static Synchronized Methods.
synchronized Statements.
Synchronization Designs.

wait, notifyAll, and notify.
Details of Waiting and Notification.
Thread Scheduling.
Voluntary Rescheduling.

Deadlocks.
Ending Thread Execution.
Cancelling a Thread.
Waiting for a Thread to Complete.

Ending Application Execution.
volatile.
Thread Management, Security and ThreadGroup.
Threads and Exceptions.
Don't stop.

ThreadLocal Variables.
Debugging Threads.

11. Programming with Types.
Wrapper Classes.
Void.
Boolean.
Character.
Number.
The Integer Wrappers.
The Floating*Point Wrapper Classes.

Reflection.
The Class class.
Naming Classes.
Examining Class Members.
The Modifier Class.
The Field Class.
The Method Class.
Creating New Objects and the Constructor Class.
Access Checking and AccessibleObject.
Arrays.
Packages.
The Proxy Class.

Loading Classes.
The ClassLoader Class.
Preparing a Class for use.
Loading Related Resources.


12. Garbage Collection and Memory.
Garbage Collection.
A Simple Model.
Finalization.
Resurrecting Objects during finalize.

Interacting with the Garbage Collector.
Reachability States and Reference Objects.
The Reference Class.
Strengths of Reference and Reachability.
Reference Queues.


13. Packages.
Package Naming.
Type Imports.
Package Access.
Accessibility and Overriding Methods.

Package Contents.
Package Objects and Specifications.

14. Documentation Comments.
The Anatomy of a Doc Comment.
Tags.
@see.
{@link}.
@param.
@return.
@throws and @exception.
@deprecated.
@author.
@version.
@since.
{@docRoot}.

An Example.
External Conventions.
Overview and Package Documentation.
The doc*files Directory.

Notes on Usage.

15. The I/O Package.
Byte Streams.
InputStream.
OutputStream.

Character Streams.
Reader.
Writer.
Character Streams and the Standard Streams.

InputStreamReader and OutputStreamWriter.
A Quick Tour of The Stream Classes.
Synchronization and Concurrency.
Filter Streams.
Buffered Streams.
Piped Streams.
ByteArray Byte Streams.
CharArray Character Streams.
String Character Streams.
Print Streams.
LineNumberReader.
SequenceInputStream.
Pushback Streams.
StreamTokenizer.

The Data Byte Streams.
DataInput and DataOutput.
The Data Stream Classes.

Working with Files.
File Streams and FileDescriptor.
RandomAccessFile.
The File Class.
FilenameFilter and FileFilter.

Object Serialization.
The Object Byte Streams.
Making Your Classes Serializable.
Serialization and Deserialization Order.
Customized Serialization.
Object Versioning.
Serialized Fields.
The Externalizable Interface.
Documentation Comment Tags.

The IOException Classes.

16. Collections.
Collections.
Exception Conventions.

Iteration.
Ordering using Comparable and Comparator.
The Collection Interface.
Set and SortedSet.
HashSet.
TreeSet.

List.
ArrayList.
LinkedList.

Map and SortedMap.
HashMap.
TreeMap.
WeakHashMap.

Wrapped Collections and the Collections Class.
The Synchronization Wrappers.
The Unmodifiable Wrappers.
The Collections Utilities.

The Arrays Utility Class.
Writing Iterator Implementations.
Writing Collection Implementations.
The Legacy Collection Types.
Enumeration.
Vector.
Stack.
Dictionary.
Hashtable.

Properties.

17. Miscellaneous Utilities.
BitSet.
Observer/Observable.
Random.
StringTokenizer.
Timer and TimerTask.
Math and StrictMath.

18. System Programming.
The System Class.
Standard I/O Streams.
System Properties.
Utility Methods.

Creating Processes.
The Process Class.
Process Environments.
Portability.

Shutdown.
Shutdown Hooks.
The Shutdown Sequence.
Shutdown Strategies.

The Rest of the Runtime.
Loading Native Code.
Debugging.

Security.
The SecurityManager Class.
Permissions.
Security Policies.
Access Controllers and Privileged Execution.


19. Internationalization and Localization.
Locale.
Resource Bundles.
ListResourceBundle.
PropertyResourceBundle.
Subclassing ResourceBundle.

Time, Dates, and Calendars.
Calendars.
Time Zones.
GregorianCalendar and SimpleTimeZone.

Formatting and Parsing Dates and Times.
Internationalization and Localization for Text.
Collation.
Formatting and Parsing.
Text Boundaries.


20. Standard Packages.
java.awt---The Abstract Window Toolkit.
java.applet---Applets.
java.beans---Components.
java.math---Mathematics.
java.net---The Network.
java.rmi---Remote Method Invocation.
java.security --- Security Tools.
java.sql --- Relational Database Access.
Utility Subpackages.
Archive Files---java.util.jar.
ZIP Files---java.util.zip.

javax.*---Standard Extensions.
javax.accessibility --- Accessibility for GUIs.
javax.naming---Directory and Naming Services.
javax.sound---Sound Manipulation.
javax.swing --- Swing GUI Components.
org.omg.CORBA --- CORBA APIs.

Appendix A. Runtime Exceptions.
RuntimeException Classes.
Error Classes.

Appendix B Useful Tables.
Table 1: Keywords.
Table 2: Operator Precedence.
Table 3: Unicode Digits.
Table 4: Unicode Letters and Digits.
Table 5: Special Characters Using \.
Table 6: Documentation Comment Tags.
Table 7: Unicode Character Blocks.

Further Reading.
Index. 0201704331T04062001



Back to Top

商品描述(中文翻譯)

描述
這是由 Java 語言的創始人所撰寫的權威 Java 書籍。這一新版從頭到尾進行了徹底的修訂,描述了 Java 程式語言的最新版本,即 Java 2 平台標準版的 1.3 版本。這第三版不僅僅是 API 更新,還重新結構化以更深入地處理較新的語言特性,以及提供有關使用新核心類別(如集合和國際化包)的資訊範例。
直接來自 Java™ 程式語言的創造者,這第三版提供了獨特的見解,解釋了語言的設計理念及其使用方式。進階學生會發現這一新版是寶貴的參考資料,並將獲得對語言細微之處的新見解。初學者和中級學生將從有價值的範例和清晰的語言及庫特性解釋中受益。

適合課程
Java--中級程式設計。

目錄
1. 快速導覽。
開始使用。
變數。
程式碼中的註解。
命名常數。
Unicode 字元。
控制流程。
類別與物件。
創建物件。
靜態或類別欄位。
垃圾回收器。
方法與參數。
調用方法。
this 參考。
靜態或類別方法。
陣列。
字串物件。
擴展類別。
從超類別調用方法。
物件類別。
類型轉換。
介面。
異常。
套件。
Java 平台。
其他主題簡要說明。

2. 類別與物件。
簡單類別。
類別成員。
類別修飾符。
欄位。
欄位初始化。
靜態欄位。
final 欄位。
存取控制。
創建物件。
建構與初始化。
建構子。
初始化區塊。
靜態初始化。
方法。
靜態方法。
方法調用。
方法執行與返回。
參數值。
使用方法控制存取。
this。
方法重載。
main 方法。
本地方法。

3. 擴展類別。
擴展類別。
擴展類別中的建構子。
建構子順序依賴。
繼承與重新定義成員。
覆寫。
隱藏欄位。
存取繼承成員。
可存取性與覆寫。
隱藏靜態成員。
super 關鍵字。
類型相容性與轉換。
相容性。
顯式類型轉換。
測試類型。
protected 的真正含義。
標記方法與類別為 final。
抽象類別與方法。
物件類別。
克隆物件。
克隆策略。
正確克隆。
淺克隆與深克隆。
擴展類別:如何與何時。
設計可擴展的類別。
設計可擴展的框架。
單一繼承與多重繼承。

4. 介面。
簡單介面範例。
介面聲明。
介面常數。
介面方法。
介面修飾符。
擴展介面。
繼承與隱藏常數。
繼承、覆寫與重載方法。
使用介面。
實作介面。
使用實作。
標記介面。
何時使用介面。

5. 嵌套類別與介面。
靜態嵌套類型。
靜態嵌套類別。
嵌套介面。
內部類別。
存取封閉物件。
擴展內部類別。
繼承、範圍與隱藏。
本地內部類別。
匿名內部類別。
繼承嵌套類型。
介面中的嵌套。
介面中的可修改變數。
嵌套類型的實作。

6. 標記、運算符與表達式。
詞彙元素。
字元集。
註解。
標記。
識別符。
關鍵字。
類型與字面量。
參考字面量。
布林字面量。
字元字面量。
整數字面量。
浮點字面量。
字串字面量。
類別字面量。
變數。
欄位與本地變數聲明。
參數變數。
final 變數。
陣列變數。
陣列修飾符。
陣列的陣列。
陣列初始化。
陣列與類型。
名稱的意義。
算術運算。
整數算術。
浮點算術。
嚴格與非嚴格浮點算術。
一般運算符。
自增與自減運算符。
關係與相等運算符。
邏輯運算符。
instanceof。
位元操作運算符。
條件運算符 ?:.
指派運算符。
字串串接運算符。
new。
表達式。
評估順序。
表達式類型。
隱式類型轉換。
顯式類型轉換。
字串轉換。
成員存取。
尋找正確的方法。
運算符優先順序與結合性。

7. 控制流程。
語句與區塊。
if-else。
switch。
while 與 do-while。
for。
標籤。
break。
continue。
return。
什麼?沒有 goto?

8. 異常。
創建異常類型。
throw。
控制轉移。
非同步異常。
throws 子句。
throws 子句與方法覆寫。
throws 子句與本地方法。
try、catch 與 finally。
finally。
何時使用異常。

9. 字串。
基本字串操作。
字串比較。
字串字面量等價。
實用方法。
創建相關字串。
字串轉換。
字串與 char 陣列。
字串與 byte 陣列。
字元編碼。
StringBuffer 類別。
修改緩衝區。
獲取數據。
容量管理。

10. 執行緒。
創建執行緒。
使用 Runnable。
同步。
synchronized 方法。
靜態同步方法。
synchronized 語句。
同步設計。
wait、notifyAll 與 notify。
等待與通知的細節。
執行緒排程。
自願重新排程。
死鎖。
結束執行緒執行。
取消執行緒。
等待執行緒完成。
結束應用程式執行。
volatile。
執行緒管理、安全性與 ThreadGroup。
執行緒與異常。
不要停止。
ThreadLocal 變數。
除錯執行緒。

11. 使用類型編程。
包裝類。
Void。
Boolean。
Character。
Number。
Integer 包裝類。
浮點包裝類。
反射。
Class 類。
命名類別。
檢查類別成員。
Modifier 類。
Field 類。
Method 類。
創建新物件與 Constructor 類。
存取檢查與 AccessibleObject。
陣列。
套件。
Proxy 類。
載入類別。
ClassLoader 類。
準備類別以供使用。
載入相關資源。

12. 垃圾回收與記憶體。
垃圾回收。
簡單模型。
最終化。
在 finalize 中復活物件。
與垃圾回收器互動。
可達性狀態與參考物件。
Reference 類。
參考與可達性的強度。
參考佇列。

13. 套件。
套件命名。
類型導入。
套件存取。
可存取性與覆寫方法。
套件內容。
套件物件與規範。

14. 文件註解。
文件註解的結構。
標籤。
@see。
{@link}。
@param。
@return。
@throws 與 @exception。
@deprecated。
@author。
@version。
@since。
{@docRoot}。
範例。
外部約定。
概述與套件文件。
doc*files 目錄。
使用注意事項。

15. I/O 套件。
位元組流。
InputStream。
OutputStream。
字元流。
Reader。
Writer。
字元流與標準流。
InputStreamReader 與 OutputStreamWriter。
流類別的快速導覽。
同步與並發。
過濾流。
緩衝流。