Next

# The Java Language Specification

This document is a preliminary specification of the JavaTM language. Both the specification and the language are subject to change. When a feature that exists in both Java and ANSI C isn't explained fully in this specification, the feature should be assumed to work as it does in ANSI C. Send comments on the Java Language and specification to java@java.Sun.COM. See also http://java.sun.com/mail.html for a list of Java-related mailing lists.

## Table of Contents

1 - Program Structure
2 - Lexical Issues
  2.1 - Comments
  2.2 - Identifiers
  2.3 - Keywords
  2.4 - Literals
  2.4.1 - Integer Literals
  2.4.2 - Floating Point Literals
  2.4.3 - Boolean Literals
  2.4.4 - Character Literals
  2.4.5 - String Literals
  2.5 - Operators and Miscellaneous Separators
3 - Types
  3.1 - Numeric Types
  3.1.1 - Integer Types
  3.1.2 - Floating Point Types
  3.1.3 - Character Types
  3.2 - Boolean Types
  3.3 - Arrays
  3.3.1 - Array Detail
4 - Classes
  4.1 - Casting Between Class Types
  4.2 - Methods
  4.2.1 - Instance Variables
  4.2.2 - The this and super Variables
  4.2.3 - Setting Local Variables
  4.3 - Overriding Methods
  4.4 - Overload Resolution
  4.5 - Constructors
  4.6 - Object Creation--the new Operator
  4.6.1 - Garbage Collection
  4.6.2 - Finalization
  4.6.3 - The null Reference
  4.7 - Static Methods, Variables, and Initializers
  4.7.1 - Order of Declarations
  4.7.2 - Order of Initialization
  4.8 - Access Specifiers
  4.9 - Variable Scoping Rules
  4.10 - Modifiers
  4.10.1 - Threadsafe Variables
  4.10.2 - Transient Variables
  4.10.3 - Final Classes, Methods, and Variables
  4.10.4 - Native Methods
  4.10.5 - Abstract Methods
  4.10.6 - Synchronized Methods and Blocks
5 - Interfaces
  5.1 - Interfaces as Types
  5.2 - Methods in Interfaces
  5.3 - Variables in Interfaces
  5.4 - Combining Interfaces
6 - Packages
  6.1 - Specifying a Compilation Unit's Package
  6.2 - Using Classes and Interfaces from Other Packages
7 - Expressions
  7.1 - Operators
  7.1.1 - Operators on Integers
  7.1.2 - Operators on Boolean Values
  7.1.3 - Operators on Floating Point Values
  7.1.4 - Operators on Arrays
  7.1.5 - Operators on Strings
  7.1.6 - Operators on Objects
  7.2 - Casts and Conversions
8 - Statements
  8.1 - Declarations
  8.2 - Expressions
  8.3 - Control Flow
  8.4 - Exceptions
  8.4.1 - The finally Statement
  8.4.2 - Runtime Exceptions
A - Appendix: Floating Point
  A.1 - Special Values
  A.2 - Binary Format Conversion
  A.3 - Ordering
  A.4 - Summary of IEEE-754 Differences
B - Appendix: Java Language Grammar

Next

Generated with CERN WebMaker