Java Rules (Paperback)
暫譯: Java 規則 (平裝本)
Douglas Dunn
- 出版商: Addison Wesley
- 出版日期: 2001-10-10
- 定價: $1,500
- 售價: 2.7 折 $399
- 語言: 英文
- 頁數: 720
- 裝訂: Paperback
- ISBN: 0201709163
- ISBN-13: 9780201709162
-
相關分類:
Java 程式語言
立即出貨(限量) (庫存=10)
買這商品的人也買了...
-
$2,390$2,271 -
$900Java Event Handling (Paperback)
-
$580$452 -
$1,580$1,501 -
$799$639 -
$399.NET Architecture and Programming Using Visual C++ (Paperback)
-
$1,575$1,496 -
$620$490 -
$580$522 -
$480$379 -
$450$356 -
$990$782 -
$450$351 -
$620$490 -
$650$514 -
$650$507 -
$520$406 -
$480$379 -
$400$316 -
$880$695 -
$350$298 -
$600$480 -
$450$351 -
$490$417 -
$700$553
商品描述
Detailed yet accessible, Java™ Rules is a comprehensive reference for the application programmer who needs to master the intricacies of the Java™ programming language. Thoroughly describing the core of the Java programming language and the Java™ virtual machine (JVM™), Java™ Rules makes it possible for programmers to efficiently master the Java platform.
Based on the second editions of The Java™ Language Specification and The Java™ Virtual Machine Specification, Java™ Rules presents a subset of those specifications in a gentle tutorial style. From platform basics to APIs, this encyclopedic guidebook reveals every facet of the language--including previously undocumented features. Throughout the book, practical tutorials are supported with official language documentation or with insights shared by respected leaders. The book's unique format and conversational style are ideally suited for experienced programmers seeking a short path to language proficiency.
As both a tutorial and detailed reference, this volume of Java™ Rules covers:
- Lexical structure, escape sequences, and positional notation systems
- The anatomy of a compilation unit
- The five kinds of classes and interfaces
- Containment and inner class hierarchies (versus inheritance hierarchies)
- The static modifier, this and super
- Primitive data types and Object
- Strings and other common data types
- Arrays and the Collections Framework
With Java™ Rules in hand, both novices and experienced programmers can quickly master the language.
Table of Contents
Preface.
About This Book.
A Java Tradition.
1. Lexical Structure.
White Space.
Comments.
Identifiers.
Keywords.
Literals.
Escape Sequences.
String Literals.
Numeric Literals.
Class Literals.
Separators.
Operators.
2. Compilation Units.
The Terminology of Class Body Declarations.
Recognizing Constructors in Source Code.
Anatomy of a Compilation Unit.
The Significance of Textual Order.
Limit of One “public” Package Member.
Package Declarations.
The Members of a Package.
Using the SDK to Develop Packages.
Import Declarations.
Redundant Imports.
Importing Nested Classes of All Sorts (Top-Level or Inner).
How Import Declarations are Used by a Compiler.
The Efficiency of Type-Import-on-Demand Declarations.
Type Declarations.
Interface Type Declarations.
The Definition of Top-Level Classes.
Helper Classes are Not Fundamentally Different.
The Five Kinds of Classes and Interfaces.
Non-“public” Member Classes.
Local and Anonymous Classes.
Nested Interfaces.
Choosing Which Kind of Class to Use.
The Rationale for Containment and Inner Class Hierarchies.
Containment and Inner Class Hierarchies.
Inner Class Hierarchies.
3. The “static” Modifier, “this,” and “super” .
The “static” Modifier.
“static” Methods.
“static” Classes.
The Definition of “static” Context.
The “this” and “super” Keywords.
The Direct Superclass (“super” ).
Practical Uses of the “this” and “super” Keywords.
Multiple Current Instances (a.k.a. Levels).
Qualifying the “this” Keyword.
Qualifying the “new” Keyword.
Qualifying the “super” Keyword.
4. Primitive Data Types and Object.
The Definition of Data Types.
The Object-Oriented Definition of Type.
Numeric Data Types.
Floating-Point Types.
Understanding the Floating-Point Types.
The “char” Data Type.
The “boolean” Data Type.
The “null” Type.
The “Number” Class.
The “java.math” Package.
The “BigDecimal” Class.
Currency Calculations.
Rounding the Result of a Floating-Point Operation.
Using Integral Types to Store Monetary Values.
Primitive Type Wrapper Classes.
Converting Primitive Numeric Types to Strings.
Bit Pattern Manipulation.
Accessing Primitive Type System Properties.
Unicode Utility Methods.
The “Object” Class.
Understanding Hash Tables.
The Five Housekeeping Methods.
The Comparison Methods.
What is Natural Ordering?
Reverse Order (or Descending) Sorts.
Sorting By More Than One Field.
The “Comparable” Interface.
The “Comparator” Interface.
5. Strings and Other Common Data Types.
Would-Be Mutator Methods.
The Length of a “String” or “StringBuffer” .
The Capacity of a “StringBuffer” .
“String” Indices.
Checked Exceptions in String and “StringBuffer” .
The “String” Class.
Comparing Strings.
Accessing Individual Characters or Substrings.
“char” to “String” Conversions and Vice Versa.
Translating Locally Encoded Strings.
Miscellaneous Methods in the “String” Class.
Unusual Constructors in the “String” Class.
The “StringBuffer” Class.
Other Methods in the “StringBuffer” Class.
Other String-Related Classes.
The “StringReader” and “StringWriter” Classes.
Lexical Analysis.
The “StringTokenizer” Class.
The “StreamTokenizer” Class.
String Concatenation Operations.
Implicit String Conversions.
The Intern Mechanism.
Shared Character Buffers.
Displaying Diagnostic Messages on the Console.
The “print” and “println” Methods.
The Locale” Class.
Supported Locales.
The “Date” Class.
The “GregorianCalendar” Class.
The Inconsistent Field Rule.
The Maximum DAY_OF_MONTH Rule.
Date and Time Fields in the Calendar Class.
Normalizing Date and Time Fields.
Date and Time Field Manipulation Methods.
The “TimeZone” Class.
Understanding the Difference between i18n and l10n.
The Localization of Common Data Types.
Formatting Dates and Times.
6. Arrays and The Collections Framework.
Array, Component, and Element Types.
Arrays.
Array Classes Are Dynamically Created.
The Members of an Array Type.
Array Type Variable Declarations.
Initializing Array Type Variables.
Array Access Expressions.
A Bridge over Troubled Waters (the “toArray” Methods).
Untyped References versus Parameterized Types.
Time Complexities (or Big-O Notation).
Amortized Constant Time.
Logarithmic Time.
Linear Time.
Quadratic Time.
The Equivalence Relationship and Elements.
Duplicate Elements.
The Collections Framework.
The Principle of Maximum Generality.
The “Collection” Interface.
The Map Interface.
Housekeeping Methods for Containers.
General-Purpose Implementations.
Performance Tuning the General-Purpose Implementations.
Special-Purpose Implementations.
Views.
Unmodifiable Views.
Range Views (Sublists, Subsets, and Submaps).
Collection Views of a Map.
List View of an Array.
Iterators.
Using Collection Views to Iterate over a Map.
A Poor Man's Collection.
Synchronized Iterators.
Fail-Fast Iterators.
Iterating Backwards Through a “TreeSet” or “TreeMap” .
Al-Khwarizmi Concerning the Hindu Art of Reckoning.
Utility Methods for “Arrays” and Other “Collections” .
Searching.
Cloning versus Copying a Container.
Shuffling.
Filling.
The Minimum and Maximum Elements.
Convenience Implementations.
An “equals” Method for Arrays.
Custom Implementations of the Core Collection Interfaces.
Optional Operations.
Restricted Containers.
Standard Constructors.
Multimaps and Multidimensional Arrays.
Multidimensional Arrays.
Legacy Containers.
商品描述(中文翻譯)
詳細而易於理解的《Java™ 規則》是應用程式設計師的全面參考資料,幫助他們掌握 Java™ 程式語言的複雜性。《Java™ 規則》徹底描述了 Java 程式語言的核心及 Java™ 虛擬機(JVM™),使程式設計師能夠有效地掌握 Java 平台。
基於《Java™ 語言規範》和《Java™ 虛擬機規範》的第二版,《Java™ 規則》以輕鬆的教學風格呈現這些規範的子集。從平台基礎到 API,這本百科全書式的指南揭示了語言的每一個面向,包括先前未記錄的特性。全書中的實用教程都得到了官方語言文檔或受人尊敬的領導者分享的見解的支持。這本書獨特的格式和對話式風格非常適合尋求快速掌握語言的經驗豐富的程式設計師。
作為一本教學和詳細參考的書籍,《Java™ 規則》涵蓋了:
- 詞法結構、轉義序列和位置表示法系統
- 編譯單元的結構
- 五種類別和介面的類型
- 包含和內部類別層次結構(與繼承層次結構相對)
- 靜態修飾符、this 和 super
- 原始資料類型和 Object
- 字串和其他常見資料類型
- 陣列和集合框架
有了《Java™ 規則》,無論是新手還是經驗豐富的程式設計師都能迅速掌握這門語言。
**目錄**
前言。
關於本書。
Java 傳統。
1. 詞法結構。
引言。
空白字元。
縮排。
註解。
註解大型程式碼區塊。
識別符。
Java 命名慣例。
關鍵字。
字面量。
字元字面量。
轉義序列。
字串字面量。
數字字面量。
類別字面量。
分隔符。
運算符。
2. 編譯單元。
引言。
類別主體聲明的術語。
Java 中欄位的定義。
識別源代碼中的建構子。
編譯單元的結構。
特殊初始化方法。
文本順序的重要性。
“public” 包成員的限制。
包聲明。
包名稱。
包的成員。
使用 SDK 開發包。
導入聲明。
自動導入。
冗餘導入。
導入各種嵌套類別(頂層或內部)。
導入聲明如何被編譯器使用。
按需導入聲明的效率。
類型聲明。
類型聲明。
介面類型聲明。
頂層類別的定義。
輔助類別並不根本不同。
反對使用輔助類別的技術論點。
五種類別和介面的類型。
“Public” 頂層類別。
非“public” 成員類別。
局部和匿名類別。
嵌套介面。
選擇使用哪種類別。
從 “VectorEnumerator” 到匿名類別。
包含和內部類別層次結構的理由。
包含和內部類別層次結構。
包含層次結構。
內部類別層次結構。
3. “static” 修飾符、“this”和“super”。
引言。
“static” 修飾符。
“static” 欄位。
“static” 方法。
“static” 類別。
“static” 上下文的定義。
內部類別層次結構中的 “static” 上下文。
“this”和“super” 關鍵字。
當前物件(“this”)。
直接超類(“super”)。
“this”和“super” 關鍵字的實用用途。
使用 “super” 參考不同包中的成員。
多個當前實例(又名層級)。
關於深度嵌套類型的說明。
限定 “this” 關鍵字。
限定 “new” 關鍵字。
限定 “super” 關鍵字。
4. 原始資料類型和 Object。
引言。
資料類型的定義。
資料類型作為值的集合。
物件導向的類型定義。
數字資料類型。
整數類型。
浮點類型。
理解浮點類型。
“char” 資料類型。
“boolean” 資料類型。
“null” 類型。
“Number” 類別。
“java.math” 包。
“BigInteger” 類別。
“BigDecimal” 類別。
貨幣計算。
不精確的結果和比較運算符。
四捨五入浮點運算的結果。
使用整數類型儲存貨幣值。
原始類型包裝類別。
解析字串以獲取原始類型值。
將原始數字類型轉換為字串。
位元模式操作。
訪問原始類型系統屬性。
Unicode 實用方法。
“Object” 類別。
參考相等與等價關係。
理解雜湊表。
五個維護方法。
比較方法。
什麼是預設排序?
什麼是自然排序?
反向排序(或降序)。
按多個欄位排序。
“Comparable” 介面。
“Comparator” 介面。
5. 字串和其他常見資料類型。
引言。
可能的變更方法。
“String” 或 “StringBuffer” 的長度。
“StringBuffer” 的容量。
確保 “StringBuffer” 的容量。
“String” 索引。
“String” 和 “StringBuffer” 中的右開區間。
字串和 “StringBuffer” 中的檢查異常。
“String” 類別。
大小寫映射。
比較字串。
訪問單個字元或子字串。
“char” 到 “String” 的轉換及反之。
翻譯本地編碼的字串。
“String” 類別中的其他方法。
“String” 類別中的不尋常建構子。
“StringBuffer” 類別。
重載的插入和附加方法。
“StringBuffer” 類別中的其他方法。
其他與字串相關的類別。
“StringCharacterIterator” 類別。
“StringReader” 和 “StringWriter” 類別。
詞法分析。
“BreakIterator” 類別。
“StringTokenizer” 類別。
“StreamTokenizer” 類別。
字串串接操作。
關於重載的二元 + 運算符的說明。
隱式字串轉換。
Intern 機制。
共享字元緩衝區。
在控制台上顯示診斷消息。
標準 I/O。
“print” 和 “println” 方法。
“Locale” 類別。
預設區域。
支援的區域。
“Date” 類別。
日期比較。
“GregorianCalendar” 類別。
實例化 “GregorianCalendar” 類別。
不一致的欄位規則。
最大 DAY_OF_MONTH 規則。
日曆類別中的日期和時間欄位。
日期和時間欄位的標準預設值。
標準化日期和時間欄位。
日期和時間欄位操作方法。
“TimeZone” 類別。
理解 i18n 和 l10n 之間的差異。
常見資料類型的本地化。
格式化數字。
格式化日期和時間。
6. 陣列和集合框架。
引言。
陣列、組件和元素類型。
陣列。
“for” 迴圈的標準形式。
陣列類別是動態創建的。
陣列類型的成員。
陣列類型變數聲明。
初始化陣列類型變數。
陣列訪問表達式。
一座跨越動盪水域的橋(“toArray” 方法)。
未類型化引用與參數化類型。
什麼是運行時類型?
時間複雜度(或大 O 符號)。
常數時間操作。
攤銷常數時間。
對數時間。
線性時間。
二次時間。
等價關係和元素。
重複元素。
在 “Set” 中使用可變物件作為元素或在 “Map” 中作為鍵。
集合框架。
批量操作。
最大通用性的原則。
“Collection” 介面。
Map 介面。
容器的維護方法。
通用實現。
選擇通用實現。
性能調整通用實現。
特殊用途實現。
“WeakHashMap”。
視圖。
同步視圖。
不可修改視圖。
範圍視圖(子列表、子集和子映射)。
Map 的集合視圖。
陣列的列表視圖。
迭代器。
列表迭代器。
使用集合視圖迭代 Map。
一個窮人的集合。
同步迭代器。
快速失敗迭代器。
在 “TreeSet” 或 “TreeMap” 中反向迭代。
阿爾-花拉子米關於印度計算藝術的說明。
“Arrays” 和其他 “Collections” 的實用方法。
排序容器。
搜尋。
克隆與複製容器。
洗牌。
填充。
最小和最大元素。
便利實現。
陣列的 “equals” 方法。
核心集合的自定義實現。