The Java Programming Language, 4/e (Paperback)
暫譯: Java 程式語言(第 4 版,平裝本)
Ken Arnold, James Gosling, David Holmes
- 出版商: Addison Wesley
- 出版日期: 2005-08-27
- 定價: $2,450
- 售價: 9.0 折 $2,205
- 語言: 英文
- 頁數: 928
- 裝訂: Paperback
- ISBN: 0321349806
- ISBN-13: 9780321349804
-
相關分類:
Java 程式語言
立即出貨
買這商品的人也買了...
-
$590$466 -
$990$782 -
$880$748 -
$820$648 -
$680$646 -
$490$382 -
$880$695 -
$1,127Database System Concepts, 5/e (IE) (美國版ISBN:0072958863)
-
$860$679 -
$880$695 -
$750$585 -
$2,740$2,603 -
$550$435 -
$390$308 -
$580$458 -
$780$741 -
$199Communication Skills Handbook (Paperback)
-
$780$663 -
$650$507 -
$550$435 -
$980$774 -
$680$537 -
$720$569 -
$1,200$948 -
$690$587
商品描述
Table of Contents:
Preface xxi
Chapter 1: A Quick Tour 1
1.1 Getting Started 1
1.2 Variables 3
1.3 Comments in Code 6
1.4 Named Constants 7
1.5 Unicode Characters 8
1.6 Flow of Control 9
1.7 Classes and Objects 12
1.8 Methods and Parameters 15
1.9 Arrays 18
1.10 String Objects 21
1.11 Extending a Class 24
1.12 Interfaces 27
1.13 Generic Types 29
1.14 Exceptions 32
1.15 Annotations 35
1.16 Packages 36
1.17 The Java Platform 38
1.18 Other Topics Briefly Noted 39Chapter 2: Classes and Objects 41
2.1 A Simple Class 42
2.2 Fields 44
2.3 Access Control 47
2.4 Creating Objects 49
2.5 Construction and Initialization 50
2.6 Methods 56
2.7this
68
2.8 Overloading Methods 69
2.9 Importing Static Member Names 71
2.10 Themain
Method 73
2.11 Native Methods 74Chapter 3: Extending Classes 75
3.1 An Extended Class 76
3.2 Constructors in Extended Classes 80
3.3 Inheriting and Redefining Members 84
3.4 Type Compatibility and Conversion 90
3.5 Whatprotected
Really Means 93
3.6 Marking Methods and Classesfinal
96
3.7 Abstract Classes and Methods 97
3.8 TheObject
Class 99
3.9 Cloning Objects 101
3.10 Extending Classes: How and When 107
3.11 Designing a Class to Be Extended 108
3.12 Single Inheritance versus Multiple Inheritance 114Chapter 4: Interfaces 117
4.1 A Simple Interface Example 118
4.2 Interface Declarations 120
4.3 Extending Interfaces 122
4.4 Working with Interfaces 126
4.5 Marker Interfaces 130
4.6 When to Use Interfaces 131Chapter 5: Nested Classes and Interfaces 133
5.1 Static Nested Types 133
5.2 Inner Classes 136
5.3 Local Inner Classes 142
5.4 Anonymous Inner Classes 144
5.5 Inheriting Nested Types 146
5.6 Nesting in Interfaces 148
5.7 Implementation of Nested Types 149Chapter 6: Enumeration Types 151
6.1 A Simple Enum Example 151
6.2 Enum Declarations 152
6.3 Enum Constant Declarations 154
6.4java.lang.Enum
159
6.5 To Enum or Not 160Chapter 7: Tokens, Values, and Variables 161
7.1 Lexical Elements 161
7.2 Types and Literals 166
7.3 Variables 169
7.4 Array Variables 173
7.5 The Meanings of Names 178Chapter 8: Primitives as Types 183
8.1 Common Fields and Methods 184
8.2Void
187
8.3Boolean
187
8.4Number
188
8.5Character
192
8.6 Boxing Conversions 198Chapter 9: Operators and Expressions 201
9.1 Arithmetic Operations 201
9.2 General Operators 204
9.3 Expressions 214
9.4 Type Conversions 216
9.5 Operator Precedence and Associativity 221
9.6 Member Access 223Chapter 10: Control Flow 229
10.1 Statements and Blocks 229
10.2if-else
230
10.3switch
232
10.4while
anddo-while
235
10.5for
236
10.6 Labels 241
10.7break
241
10.8continue
244
10.9return
245
10.10 What, Nogoto
? 246Chapter 11: Generic Types 247
11.1 Generic Type Declarations 250
11.2 Working with Generic Types 256
11.3 Generic Methods and Constructors 260
11.4 Wildcard Capture 264
11.5 Under the Hood: Erasure and Raw Types 267
11.6 Finding the Right Method--Revisited 272
11.7 Class Extension and Generic Types 276Chapter 12: Exceptions and Assertions 279
12.1 Creating Exception Types 280
12.2throw
282
12.3 Thethrows
Clause 283
12.4try
,catch
, andfinally
286
12.5 Exception Chaining 291
12.6 Stack Traces 294
12.7 When to Use Exceptions 294
12.8 Assertions 296
12.9 When to Use Assertions 297
12.10 Turning Assertions On and Off 300Chapter 13: Strings and Regular Expressions 305
13.1 Character Sequences 305
13.2 TheString
Class 306
13.3 Regular Expression Matching 321
13.4 TheStringBuilder
Class 330
13.5 Working with UTF-16 336Chapter 14: Threads 337
14.1 Creating Threads 339
14.2 UsingRunnable
341
14.3 Synchronization 345
14.4wait
,notifyAll
, andnotify
354
14.5 Details of Waiting and Notification 357
14.6 Thread Scheduling 358
14.7 Deadlocks 362
14.8 Ending Thread Execution 365
14.9 Ending Application Execution 369
14.10 The Memory Model: Synchronization andvolatile
370
14.11 Thread Management, Security, andThreadGroup
375
14.12 Threads and Exceptions 379
14.13ThreadLocal
Variables 382
14.14 Debugging Threads 384Chapter 15: Annotations 387
15.1 A Simple Annotation Example 388
15.2 Annotation Types 389
15.3 Annotating Elements 392
15.4 Restricting Annotation Applicability 393
15.5 Retention Policies 395
15.6 Working with Annotations 395Chapter 16: Reflection 397
16.1 The
Class
Class 399
16.2 Annotation Queries 414
16.3 TheModifier
Class 416
16.4 The Member classes 416
16.5 Access Checking andAccessibleObject
417
16.6 TheField
Class 418
16.7 TheMethod
Class 420
16.8 Creating New Objects and theConstructor
Class 423
16.9 Generic Type Inspection 426
16.10 Arrays 429
16.11 Packages 432
16.12 TheProxy
Class 432
16.13 Loading Classes 435
16.14 Controlling Assertions at Runtime 444Chapter 17: Garbage Collection and Memory 447
17.1 Garbage Collection 447
17.2 A Simple Model 448
17.3 Finalization 449
17.4 Interacting with the Garbage Collector 452
17.5 Reachability States and Reference Objects 454Chapter 18: Packages 467
18.1 Package Naming 468
18.2 Type Imports 469
18.3 Package Access 471
18.4 Package Contents 475
18.5 Package Annotations 476
18.6 Package Objects and Specifications 477Chapter 19: Documentation Comments 481
19.1 The Anatomy of a Doc Comment 482
19.2 Tags 483
19.3 Inheriting Method Documentation Comments 489
19.4 A Simple Example 491
19.5 External Conventions 496
19.6 Notes on Usage 497Chapter 20: The I/O Package 499
20.1 Streams Overview 500
20.2 Byte Streams 501
20.3 Character Streams 507
20.4InputStreamReader
andOutputStreamWriter
512
20.5 A Quick Tour of the Stream Classes 514
20.6 The Data Byte Streams 537
20.7 Working with Files 540
20.8 Object Serialization 549
20.9 TheIOException
Classes 563
20.10 A Taste of New I/O 565Chapter 21: Collections 567
21.1 Collections 567
21.2 Iteration 571
21.3 Ordering withComparable
andComparator
574
21.4 TheCollection
Interface 575
21.5Set
andSortedSet
577
21.6List
580
21.7Queue
585
21.8Map
andSortedMap
587
21.9enum
Collections 594
21.10 Wrapped Collections and theCollections
Class 597
21.11 Synchronized Wrappers and Concurrent Collections 602
21.12 TheArrays
Utility Class 607
21.13 Writing Iterator Implementations 609
21.14 Writing Collection Implementations 611
21.15 The Legacy Collection Types 616
21.16Properties
620Chapter 22: Miscellaneous Utilities 623
22.1
Formatter
624
22.2BitSet
632
22.3Observer/Observable
635
22.4Random
639
22.5Scanner
641
22.6StringTokenizer
651
22.7Timer
andTimerTask
653
22.8UUID
656
22.9Math
andStrictMath
657Chapter 23: System Programming 661
23.1 The
System
Class 662
23.2 Creating Processes 666
23.3 Shutdown 672
23.4 The Rest ofRuntime
675
23.5 Security 677Chapter 24: Internationalization and Localization 685
24.1 Locale 686
24.2 Resource Bundles 688
24.3 Currency 694
24.4 Time, Dates, and Calendars 695
24.5 Formatting and Parsing Dates and Times 703
24.6 Internationalization and Localization for Text 708Chapter 25: Standard Packages 715
25.1
java.awt
--The Abstract Window Toolkit 717
25.2java.applet
--Applets 720
25.3java.beans
--Components 721
25.4java.math
--Mathematics 722
25.5java.net
--The Network 724
25.6java.rmi
--Remote Method Invocation 727
25.7java.security
and Related Packages--Security Tools 732
25.8java.sql
--Relational Database Access 732
25.9 Utility Subpackages 733
25.10javax.*
--Standard Extensions 737
25.11javax.accessibility
--Accessibility for GUIs 737
25.12javax.naming
--Directory and Naming Services 738
25.13javax.sound
--Sound Manipulation 739
25.14javax.swing
--Swing GUI Components 740
25.15org.omg.CORBA
--CORBA APIs 740Appendix A: Application Evolution 741
A.1 Language, Library, and Virtual Machine Versions 741
A.2 Dealing with Multiple Dialects 743
A.3 Generics: Reification, Erasure, and Raw Types 744Appendix B: Useful Tables 749
Further Reading 755
Index 761
商品描述(中文翻譯)
目錄:
前言 xxi
第1章:快速導覽 1
1.1 開始使用 1
1.2 變數 3
1.3 程式碼中的註解 6
1.4 命名常數 7
1.5 Unicode 字元 8
1.6 控制流程 9
1.7 類別與物件 12
1.8 方法與參數 15
1.9 陣列 18
1.10 字串物件 21
1.11 擴展類別 24
1.12 介面 27
1.13 泛型類型 29
1.14 異常 32
1.15 註解 35
1.16 套件 36
1.17 Java 平台 38
1.18 其他主題簡要說明 39
第2章:類別與物件 41
2.1 一個簡單的類別 42
2.2 欄位 44
2.3 存取控制 47
2.4 創建物件 49
2.5 建構與初始化 50
2.6 方法 56
2.7 this 68
2.8 方法重載 69
2.9 匯入靜態成員名稱 71
2.10 main 方法 73
2.11 本地方法 74
第3章:擴展類別 75
3.1 擴展類別 76
3.2 擴展類別中的建構子 80
3.3 繼承與重新定義成員 84
3.4 類型相容性與轉換 90
3.5 protected 的真正含義 93
3.6 標記方法與類別為 final 96
3.7 抽象類別與方法 97
3.8 Object 類別 99
3.9 複製物件 101
3.10 擴展類別:如何與何時 107
3.11 設計可擴展的類別 108
3.12 單一繼承與多重繼承 114
第4章:介面 117
4.1 一個簡單的介面範例 118
4.2 介面宣告 120
4.3 擴展介面 122
4.4 使用介面 126
4.5 標記介面 130
4.6 何時使用介面 131
第5章:巢狀類別與介面 133
5.1 靜態巢狀類型 133
5.2 內部類別 136
5.3 本地內部類別 142
5.4 匿名內部類別 144
5.5 繼承巢狀類型 146
5.6 介面中的巢狀 148
5.7 巢狀類型的實作 149
第6章:列舉類型 151
6.1 一個簡單的列舉範例 151
6.2 列舉宣告 152
6.3 列舉常數宣告 154
6.4 java.lang.Enum 159
6.5 是否使用列舉 160
第7章:標記、值與變數 161
7.1 詞法元素 161
7.2 類型與字面量 166
7.3 變數 169
7.4 陣列變數 173
7.5 名稱的意義 178
第8章:原始類型 183
8.1 常見的欄位與方法 184
8.2 Void 187
8.3 Boolean 187
8.4 Number 188
8.5 Character 192
8.6 包裝轉換 198
第9章:運算子與表達式 201
9.1 算術運算 201
9.2 一般運算子 204
9.3 表達式 214
9.4 類型轉換 216
9.5 運算子優先順序與結合性 221
9.6 成員存取 223
第10章:控制流程 229
10.1 語句與區塊 229
10.2 if-else 230
10.3 switch 232
10.4 while 與 do-while 235
10.5 for 236
10.6 標籤 241
10.7 break 241
10.8 continue 244
10.9 return 245
10.10 怎麼沒有 goto? 246
第11章:泛型類型 247
11.1 泛型類型宣告 250
11.2 使用泛型類型 256
11.3 泛型方法與建構子 260
11.4 通配符捕獲 264
11.5 內部運作:擦除與原始類型 267
11.6 尋找正確的方法—重訪 272
11.7 類別擴展與泛型類型 276
第12章:異常與斷言 279
12.1 創建異常類型 280
12.2 throw 282
12.3 throws 子句 283
12.4 try、catch 與 finally 286
12.5 異常鏈接 291
12.6 堆疊追蹤 294
12.7 何時使用異常 294
12.8 斷言 296
12.9 何時使用斷言 297
12.10 開啟與關閉斷言 300
第13章:字串與正則表達式 305
13.1 字元序列 305
13.2 String 類別 306
13.3 正則表達式匹配 321
13.4 StringBuilder 類別 330
13.5 使用 UTF-16 336
第14章:執行緒 337
14.1 創建執行緒 339
14.2 使用 Runnable 341
14.3 同步 345
14.4 wait、notifyAll 與 notify 354
14.5 等待與通知的細節 357
14.6 執行緒排程 358
14.7 死鎖 362
14.8 結束執行緒執行 365
14.9 結束應用程式執行 369
14.10 記憶體模型:同步與 volatile 370
14.11 執行緒管理、安全性與 ThreadGroup 375
14.12 執行緒與異常 379
14.13 ThreadLocal 變數 382
14.14 除錯執行緒 384
第15章:註解 387
15.1 一個簡單的註解範例 388
15.2 註解類型 389
15.3 註解元素 392
15.4 限制註解的適用性 393
15.5 保留政策 395
15.6 使用註解 395
第16章:反射 397
16.1 Class 類別 399
16.2 註解查詢 414
16.3 Modifier 類別 416
16.4 成員類別 416
16.5 存取檢查與 AccessibleObject 417
16.6 Field 類別 418
16.7 Method 類別 420
16.8 創建新物件與 Constructor 類別 423
16.9 泛型類型檢查 426
16.10 陣列 429
16.11 套件 432
16.12 Proxy 類別 432
16.13 載入類別 435
16.14 在執行時控制斷言 444
第17章:垃圾回收與記憶體 447
17.1 垃圾回收 447
17.2 一個簡單的模型 448
17.3 最終化 449
17.4 與垃圾回收器互動 452
17.5 可達性狀態與參考物件 454
第18章:套件 467
18.1 套件命名 468
18.2 類型匯入 469
18.3 套件存取 471
18.4 套件內容 475
18.5 套件註解 476