Book description
Written by the inventors of the technology, The Java™ Language Specification, Third Edition, is the definitive technical reference for the Java™ programming language. If you want to know the precise meaning of the language's constructs, this is the source for you.
The book provides complete, accurate, and detailed coverage of the Java programming language. It provides full coverage of all new features added since the previous edition, including generics, annotations, asserts, autoboxing, enums, for-each loops, variable arity methods, and static import clauses.
Table of contents
- Copyright
- Preface
- Preface to the Second Edition
- Preface to the Third Edition
- 1. Introduction
- 2. Grammars
- 3. Lexical Structure
- 4. Types, Values, and Variables
-
5. Conversions and Promotions
-
5.1. Kinds of Conversion
- 5.1.1. Identity Conversions
- 5.1.2. Widening Primitive Conversion
- 5.1.3. Narrowing Primitive Conversions
- 5.1.4. Widening and Narrowing Primitive Conversions
- 5.1.5. Widening Reference Conversions
- 5.1.6. Narrowing Reference Conversions
- 5.1.7. Boxing Conversion
- 5.1.8. Unboxing Conversion
- 5.1.9. Unchecked Conversion
- 5.1.10. Capture Conversion
- 5.1.11. String Conversions
- 5.1.12. Forbidden Conversions
- 5.1.13. Value Set Conversion
- 5.2. Assignment Conversion
- 5.3. Method Invocation Conversion
- 5.4. String Conversion
- 5.5. Casting Conversion
- 5.6. Numeric Promotions
-
5.1. Kinds of Conversion
-
6. Names
- 6.1. Declarations
- 6.2. Names and Identifiers
- 6.3. Scope of a Declaration
- 6.4. Members and Inheritance
- 6.5. Determining the Meaning of a Name
-
6.6. Access Control
- 6.6.1. Determining Accessibility
- 6.6.2. Details on protected Access
- 6.6.3. An Example of Access Control
- 6.6.4. Example: Access to public and Non-public Classes
- 6.6.5. Example: Default-Access Fields, Methods, and Constructors
- 6.6.6. Example: public Fields, Methods, and Constructors
- 6.6.7. Example: protected Fields, Methods, and Constructors
- 6.6.8. Example: private Fields, Methods, and Constructors
- 6.7. Fully Qualified Names and Canonical Names
- 6.8. Naming Conventions
- 7. Packages
-
8. Classes
- 8.1. Class Declaration
- 8.2. Class Members
- 8.3. Field Declarations
-
8.4. Method Declarations
- 8.4.1. Formal Parameters
- 8.4.2. Method Signature
- 8.4.3. Method Modifiers
- 8.4.4. Generic Methods
- 8.4.5. Method Return Type
- 8.4.6. Method Throws
- 8.4.7. Method Body
- 8.4.8. Inheritance, Overriding, and Hiding
- 8.4.9. Overloading
-
8.4.10. Examples of Method Declarations
- 8.4.10.1. Example: Overriding
- 8.4.10.2. Example: Overloading, Overriding, and Hiding
- 8.4.10.3. Example: Incorrect Overriding
- 8.4.10.4. Example: Overriding versus Hiding
- 8.4.10.5. Example: Invocation of Hidden Class Methods
- 8.4.10.6. Large Example of Overriding
- 8.4.10.7. Example: Incorrect Overriding because of Throws
- 8.5. Member Type Declarations
- 8.6. Instance Initializers
- 8.7. Static Initializers
-
8.8. Constructor Declarations
- 8.8.1. Formal Parameters and Formal Type Parameter
- 8.8.2. Constructor Signature
- 8.8.3. Constructor Modifiers
- 8.8.4. Generic Constructors
- 8.8.5. Constructor Throws
- 8.8.6. The Type of a Constructor
- 8.8.7. Constructor Body
- 8.8.8. Constructor Overloading
- 8.8.9. Default Constructor
- 8.8.10. Preventing Instantiation of a Class
- 8.9. Enums
- 9. Interfaces
- 10. Arrays
- 11. Exceptions
- 12. Execution
-
13. Binary Compatibility
- 13.1. The Form of a Binary
- 13.2. What Binary Compatibility Is and Is Not
- 13.3. Evolution of Packages
-
13.4. Evolution of Classes
- 13.4.1. abstract Classes
- 13.4.2. final Classes
- 13.4.3. public Classes
- 13.4.4. Superclasses and Superinterfaces
- 13.4.5. Class Formal Type Parameters
- 13.4.6. Class Body and Member Declarations
- 13.4.7. Access to Members and Constructors
- 13.4.8. Field Declarations
- 13.4.9. final Fields and Constants
- 13.4.10. static Fields
- 13.4.11. transient Fields
- 13.4.12. Method and Constructor Declarations
- 13.4.13. Method and Constructor Formal Type Parameters
- 13.4.14. Method and Constructor Parameters
- 13.4.15. Method Result Type
- 13.4.16. abstract Methods
- 13.4.17. final Methods
- 13.4.18. native Methods
- 13.4.19. static Methods
- 13.4.20. synchronized Methods
- 13.4.21. Method and Constructor Throws
- 13.4.22. Method and Constructor Body
- 13.4.23. Method and Constructor Overloading
- 13.4.24. Method Overriding
- 13.4.25. Static Initializers
- 13.4.26. Evolution of Enums
- 13.5. Evolution of Interfaces
-
14. Blocks and Statements
- 14.1. Normal and Abrupt Completion of Statements
- 14.2. Blocks
- 14.3. Local Class Declarations
- 14.4. Local Variable Declaration Statements
- 14.5. Statements
- 14.6. The Empty Statement
- 14.7. Labeled Statements
- 14.8. Expression Statements
- 14.9. The if Statement
- 14.10. The assert Statement
- 14.11. The switch Statement
- 14.12. The while Statement
- 14.13. The do Statement
- 14.14. The for Statement
- 14.15. The break Statement
- 14.16. The continue Statement
- 14.17. The return Statement
- 14.18. The throw Statement
- 14.19. The synchronized Statement
- 14.20. The try statement
- 14.21. Unreachable Statements
-
15. Expressions
- 15.1. Evaluation, Denotation, and Result
- 15.2. Variables as Values
- 15.3. Type of an Expression
- 15.4. FP-strict Expressions
- 15.5. Expressions and Run-Time Checks
- 15.6. Normal and Abrupt Completion of Evaluation
- 15.7. Evaluation Order
- 15.8. Primary Expressions
-
15.9. Class Instance Creation Expressions
- 15.9.1. Determining the Class being Instantiated
- 15.9.2. Determining Enclosing Instances
- 15.9.3. Choosing the Constructor and its Arguments
- 15.9.4. Run-time Evaluation of Class Instance Creation Expressions
- 15.9.5. Anonymous Class Declarations
- 15.9.6. Example: Evaluation Order and Out-of-Memory Detection
- 15.10. Array Creation Expressions
- 15.11. Field Access Expressions
-
15.12. Method Invocation Expressions
- 15.12.1. Compile-Time Step 1: Determine Class or Interface to Search
-
15.12.2. Compile-Time Step 2: Determine Method Signature
- 15.12.2.1. Identify Potentially Applicable Methods
- 15.12.2.2. Phase 1: Identify Matching Arity Methods Applicable by Subtyping
- 15.12.2.3. Phase 2: Identify Matching Arity Methods Applicable by Method Invocation Conversion
- 15.12.2.4. Phase 3: Identify Applicable Variable Arity Methods
- 15.12.2.5. Choosing the Most Specific Method
- 15.12.2.6. Method Result and Throws Types
- 15.12.2.7. Inferring Type Arguments Based on Actual Arguments
- 15.12.2.8. Inferring Unresolved Type Arguments
- 15.12.2.9. Examples
- 15.12.2.10. Example: Overloading Ambiguity
- 15.12.2.11. Example: Return Type Not Considered
- 15.12.2.12. Example: Compile-Time Resolution
- 15.12.3. Compile-Time Step 3: Is the Chosen Method Appropriate?
-
15.12.4. Runtime Evaluation of Method Invocation
- 15.12.4.1. Compute Target Reference (If Necessary)
- 15.12.4.2. Evaluate Arguments
- 15.12.4.3. Check Accessibility of Type and Method
- 15.12.4.4. Locate Method to Invoke
- 15.12.4.5. Create Frame, Synchronize, Transfer Control
- 15.12.4.6. Example: Target Reference and Static Methods
- 15.12.4.7. Example: Evaluation Order
- 15.12.4.8. Example: Overriding
- 15.12.4.9. Example: Method Invocation using super
- 15.13. Array Access Expressions
- 15.14. Postfix Expressions
- 15.15. Unary Operators
- 15.16. Cast Expressions
- 15.17. Multiplicative Operators
- 15.18. Additive Operators
- 15.19. Shift Operators
- 15.20. Relational Operators
- 15.21. Equality Operators
- 15.22. Bitwise and Logical Operators
- 15.23. Conditional-And Operator &&
- 15.24. Conditional-Or Operator ||
- 15.25. Conditional Operator ? :
- 15.26. Assignment Operators
- 15.27. Expression
- 15.28. Constant Expression
-
16. Definite Assignment
-
16.1. Definite Assignment and Expressions
- 16.1.1. Boolean Constant Expressions
- 16.1.2. The Boolean Operator &&
- 16.1.3. The Boolean Operator ||
- 16.1.4. The Boolean Operator !
- 16.1.5. The Boolean Operator ? :
- 16.1.6. The Conditional Operator ? :
- 16.1.7. Other Expressions of Type boolean
- 16.1.8. Assignment Expressions
- 16.1.9. Operators ++ and --
- 16.1.10. Other Expressions
-
16.2. Definite Assignment and Statements
- 16.2.1. Empty Statements
- 16.2.2. Blocks
- 16.2.3. Local Class Declaration Statements
- 16.2.4. Local Variable Declaration Statements
- 16.2.5. Labeled Statements
- 16.2.6. Expression Statements
- 16.2.7. if Statements
- 16.2.8. assert Statements
- 16.2.9. switch Statements
- 16.2.10. while Statements
- 16.2.11. do Statements
- 16.2.12. for Statements
- 16.2.13. break, continue, return, and throw Statements
- 16.2.14. synchronized Statements
- 16.2.15. try Statements
- 16.3. Definite Assignment and Parameters
- 16.4. Definite Assignment and Array Initializers
- 16.5. Definite Assignment and Enum Constants
- 16.6. Definite Assignment and Anonymous Classes
- 16.7. Definite Assignment and Member Types
- 16.8. Definite Assignment and Static Initializers
- 16.9. Definite Assignment, Constructors, and Instance Initializers
-
16.1. Definite Assignment and Expressions
- 17. Threads and Locks
- 18. Syntax
- Credits
- Colophon
Product information
- Title: Java™ Language Specification, Third Edition, The
- Author(s):
- Release date: June 2005
- Publisher(s): Addison-Wesley Professional
- ISBN: None
You might also like
book
Special Edition Using Linux®, Sixth Edition
Linux is a significant force in the server room and the desktop, delivering reliability, ease of …
book
Expert One-on-One™ J2EE™ Development without EJB™
What is this book about? Expert One-on-One J2EE Development without EJB shows Java developers and architects …
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …
article
Run Llama-2 Models Locally with llama.cpp
Llama is Meta’s answer to the growing demand for LLMs. Unlike its well-known technological relative, ChatGPT, …