INTRODUCTION
Example Programs
1.1
tialized to a default value, Java does not automatically initialize local variables in
order to avoid masking programming errors.
Chapter 17 describes the semantics of Java threads and locks, which are based
on the monitor based concurrency originally introduced with the Mesa program
ming language. Java specifies a memory model for shared memory multiproces
sors that supports high performance implementations.
Chapter 18 describes the facilities for automatically generating documenta
tion from special comments in Java source code.
Chapter 19 presents a LALR(1) syntactic grammar for Java, and describes the
differences between this grammar and the expository grammar used in the body of
the language specification that precedes it.
Chapters 20 through 22 are the reference manual for the core of the standard
Java Application Programming Interface. These packages must be included in all
general purpose Java systems.
Chapter 20 describes the package
java.lang
. The types defined in
java.lang
are automatically imported to be available without qualification in all
Java programs. They include the primordial class
Object
, which is a superclass of
all other classes; classes such as
Integer
and
Float
, which wrap the primitive
types inside objects; exceptions and errors defined by the language and the Java
Virtual Machine;
Thread
support; metalinguistic classes such as
Class
and
ClassLoader
; and the class
System
, which abstracts the host system.
Chapter 21 describes the package
java.util
, which defines a few basic util
ity classes, such as a hashtable class and a pseudo random number generator.
Chapter 22 describes the package
java.io
, which defines basic input/output
facilities, including random access files and streams of values of primitive types.
The book concludes with an index, credits for quotations used in the book,
and a colophon describing how the book was created.
1.1 Example Programs
Most of the example programs given in the text are ready to be executed by a Java
system and are similar in form to:
class Test {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++)
System.out.print(i == 0 ? args[i] : " " + args[i]);
System.out.println();
}
}
5
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved