Java Reference
In-Depth Information
Chapter 1. Introduction
The Java ® programming language is a general-purpose, concurrent, class-based, object-ori-
ented language. It is designed to be simple enough that many programmers can achieve flu-
ency in the language. The Java programming language is related to C and C++ but is organ-
ized rather differently, with a number of aspects of C and C++ omitted and a few ideas from
other languages included. It is intended to be a production language, not a research language,
and so, as C. A. R. Hoare suggested in his classic paper on language design, the design has
avoided including new and untested features.
The Java programming language is strongly and statically typed. This specification clearly
distinguishes between the compile-time errors that can and must be detected at compile
time, and those that occur at run time. Compile time normally consists of translating pro-
grams into a machine-independent byte code representation. Run-time activities include
loading and linking of the classes needed to execute a program, optional machine code gen-
eration and dynamic optimization of the program, and actual program execution.
The Java programming language is a relatively high-level language, in that details of the
machine representation are not available through the language. It includes automatic storage
management, typically using a garbage collector, to avoid the safety problems of explicit
deallocation (as in C's free or C++'s delete ). High-performance garbage-collected implement-
ations can have bounded pauses to support systems programming and real-time applications.
The language does not include any unsafe constructs, such as array accesses without index
checking, since such unsafe constructs would cause a program to behave in an unspecified
way.
The Java programming language is normally compiled to the bytecoded instruction set and
binary format defined in The Java Virtual Machine Specification, Java SE 7 Edition .
1.1. Organization of the Specification
Chapter 2 describes grammars and the notation used to present the lexical and syntactic
grammars for the language.
Chapter 3 describes the lexical structure of the Java programming language, which is based
on C and C++. The language is written in the Unicode character set. It supports the writing
of Unicode characters on systems that support only ASCII.
Chapter 4 describes types, values, and variables. Types are subdivided into primitive types
and reference types.
Search WWH ::




Custom Search