A class implements the Cloneable interface to
indicate to the Object.clone() method that it
is legal for that method to make a
field-for-field copy of instances of that class.
This class extends ThreadLocal to provide inheritance of values from parent
Thread to child Thread: when a child thread is created, the child receives
initial values for all InheritableThreadLocals for which the parent has
values.
The class Math contains methods for performing basic
numeric operations such as the elementary exponential, logarithm,
square root, and trigonometric functions.
The Runtime.exec methods create a native process and
return an instance of a subclass of Process that can
be used to control the process and obtain information about it.
Every Java application has a single instance of class
Runtime that allows the application to interface with
the environment in which the application is running.
The class StrictMath contains methods for performing basic
numeric operations such as the elementary exponential, logarithm,
square root, and trigonometric functions.
Thrown to indicate that the clone method in class
Object has been called to clone an object, but that
the object's class does not implement the Cloneable
interface.
Thrown when an application tries to load in a class,
but the currently executing method does not have access to the
definition of the specified class, because the class is not public
and in another package.
Thrown to indicate that a thread has attempted to wait on an
object's monitor or to notify other threads waiting on an object's
monitor without owning the specified monitor.
Thrown when an application tries to create an instance of a class
using the newInstance method in class
Class, but the specified class object cannot be
instantiated because it is an interface or is an abstract class.
Thrown when a thread is waiting, sleeping, or otherwise paused for
a long time and another thread interrupts it using the
interrupt method in class Thread.
Thrown to indicate that the application has attempted to convert
a string to one of the numeric types, but that the string does not
have the appropriate format.
Thrown by the charAt method in class
String and by other String
methods to indicate that an index is either negative or greater
than or equal to the size of the string.
Thrown when the Java Virtual Machine attempts to read a class
file and determines that the file is malformed or otherwise cannot
be interpreted as a class file.
Subclasses of LinkageError indicate that a class has
some dependency on another class; however, the latter class has
incompatibly changed after the compilation of the former class.
Thrown if the Java Virtual Machine or a classloader tries to load
in the definition of a class (as part of a normal method call or
as part of creating a new instance using the new
expression) and no definition of the class could be found.
Thrown if an application tries to call a specified method of a
class (either static or instance), and that class no longer has a
definition of that method.
Thrown when the Java Virtual Machine cannot allocate an object
because it is out of memory, and no more memory could be made
available by the garbage collector.
Thrown when the Java Virtual Machine attempts to read a class
file and determines that the major and minor version numbers
in the file are not supported.
Thrown to indicate that the Java Virtual Machine is broken or has
run out of resources necessary for it to continue operating.
Package java.lang Description
Provides classes that are fundamental to the design of the Java
programming language. The most important classes are Object,
which is the root of the class hierarchy, and Class, instances of
which represent classes at run time.
Frequently it is necessary to represent a value of primitive type as
if it were an object. The wrapper classes Boolean,
Character, Integer, Long, Float, and
Double serve this purpose. An object of type Double,
for example, contains a field whose type is double, representing that
value in such a way that a reference to it can be stored in a variable
of reference type. These classes also provide a number of methods for
converting among primitive values, as well as supporting such
standard methods as equals and hashCode. The Void class is a
non-instantiable class that holds a reference to a Class object
represening the primitive type void.
The class Math provides commonly used mathematical functions such
as sine, cosine, and square root. The classes String and
StringBuffer similarly provide commonly used operations on
character strings.
Classes ClassLoader, Process, Runtime,
SecurityManager, and System provide "system operations"
that manage the dynamic loading of classes, creation of external processes,
host environment inquiries such as the time of day, and enforcement of
security policies.
Class Throwable encompasses objects that may be thrown by the
throw statement (§14.16). Subclasses of Throwable represent errors
and exceptions.
Package Specification
Character Encodings
Various constructors and methods in the java.lang and java.io
packages accept string arguments that specify the character encoding to be used
when converting between raw eight-bit bytes and sixteen-bit Unicode characters.
Such encodings are named by strings composed of the following characters:
The uppercase letters 'A' through 'Z'
('\u0041' through '\u005a'),
The lowercase letters 'a' through 'z'
('\u0061' through '\u007a'),
The digits '0' through '9'
('\u0030' through '\u0039'),
The dash character '-'
('\u002d', HYPHEN-MINUS),
The colon character ':'
('\u003a', COLON), and
The underscore character '_'
('\u005f', LOW LINE).
An encoding name must begin with either a letter or a digit. The empty string
is not a legal encoding name.
An encoding may have more than one name. One of an encoding's names is
considered to be its canonical name. The canonical name of an encoding
is the name returned by the getEncoding methods of the InputStreamReader and OutputStreamWriter classes.
Encoding names generally follow the conventions documented in RFC2278: IANA Charset
Registration Procedures. If an encoding listed in the IANA Charset
Registry is supported by an implementation of the Java platform then one of
its names must be the name listed in the registry. Many encodings are given
more than one name in the registry, in which case the registry identifies one
of the names as MIME-preferred. An implementation of the Java platform
must support the MIME-preferred registry name for a supported encoding if there
is one; for convenience it may additionally support other registry names. The
IANA MIME-preferred name of an encoding, if there is one, is often, but not
necessarily, its canonical name. Following IANA convention, the mapping from
IANA registry names to encodings is not case-sensitive.
Every implementation of the Java platform is required to support the
following character encodings. Consult the release documentation for your
implementation to see if any other encodings are supported.
US-ASCII
Seven-bit ASCII, a.k.a. ISO646-US,
a.k.a. the Basic Latin block of the Unicode character set
ISO-8859-1
ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
UTF-8
Eight-bit Unicode Transformation Format
UTF-16BE
Sixteen-bit Unicode Transformation Format,
big-endian byte order
UTF-16LE
Sixteen-bit Unicode Transformation Format,
little-endian byte order
UTF-16
Sixteen-bit Unicode Transformation Format,
byte order specified by a mandatory initial byte-order mark
(either order accepted on input, big-endian used on output)
Every instance of the Java virtual machine has a default character
encoding. The default encoding is determined during virtual-machine startup
and typically depends upon the locale and encoding being used by the underlying
operating system.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.