There are 37 classes in java.lang package as per Java SE7
The java.lang package contains classes that are fundamental to the design of the Java language.
1) Object, Class, ClassLoader, System and Compiler classes
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
3) Math, StrictMath classes
4) String, StringBuffer and StringBuilder classes
5) Process, ProcessBuilder, Runtime, RuntimePermission classes
6) Enum>, Throwable, Void classes
----------------------------------------------
1) Object, Class, ClassLoader, System and Compiler classes
----------------------------------------------
Object: The Object class is the root of the class hierarchy. Every class has Object as a
superclass. All objects, including arrays, implement the methods of this class.
Class: The Class class instance represent classes and interfaces in a running Java application.It
has no public constructor.
ClassLoader: The ClassLoader class is an object that is responsible for loading classes. This class
is an abstract class. It may be used by security managers to indicate security domains.
System: The System class contains several useful class fields and methods. It cannot be
instantiated.
Some of the facilities provided by System class are standard input, output, error output streams
and access to externally defined properties and environment variables. This class has a utility
method for quickly copying a portion of an array. Also it has methods for loading files and
libraries
Compiler: The Compiler class is provided to support Java-to-native-code compilers and related
services. By design, it serves as a placeholder for a JIT compiler implementation.
SecurityManager: The SecurityManager class allows applications to implement a security policy.
It allows an application to determine, before performing a possibly unsafe or sensitive operation,
what the operation is and whether it is being attempted in a security context that allows the
operation to be performed. The application can allow or disallow the operation.
----------------------------------------------
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
----------------------------------------------
Frequently it is necessary to represent a value of primitive type as if it were an object. The
wrapper classes 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.
Other classes in support to wrapper classes:
----------------------------------------------
Number: The Number class is the superclass of classes BigDecimal, BigInteger, Byte, Double,
Float, Integer, Long, and Short.The Subclasses of Number must provide methods to convert the
represented num.
General Principles of Intellectual Property: Concepts of Intellectual Proper...
There are 37 classes in java.lang package as per Java SE7 The java.pdf
1. There are 37 classes in java.lang package as per Java SE7
The java.lang package contains classes that are fundamental to the design of the Java language.
1) Object, Class, ClassLoader, System and Compiler classes
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
3) Math, StrictMath classes
4) String, StringBuffer and StringBuilder classes
5) Process, ProcessBuilder, Runtime, RuntimePermission classes
6) Enum>, Throwable, Void classes
----------------------------------------------
1) Object, Class, ClassLoader, System and Compiler classes
----------------------------------------------
Object: The Object class is the root of the class hierarchy. Every class has Object as a
superclass. All objects, including arrays, implement the methods of this class.
Class: The Class class instance represent classes and interfaces in a running Java application.It
has no public constructor.
ClassLoader: The ClassLoader class is an object that is responsible for loading classes. This class
is an abstract class. It may be used by security managers to indicate security domains.
System: The System class contains several useful class fields and methods. It cannot be
instantiated.
Some of the facilities provided by System class are standard input, output, error output streams
and access to externally defined properties and environment variables. This class has a utility
method for quickly copying a portion of an array. Also it has methods for loading files and
libraries
Compiler: The Compiler class is provided to support Java-to-native-code compilers and related
services. By design, it serves as a placeholder for a JIT compiler implementation.
SecurityManager: The SecurityManager class allows applications to implement a security policy.
It allows an application to determine, before performing a possibly unsafe or sensitive operation,
what the operation is and whether it is being attempted in a security context that allows the
operation to be performed. The application can allow or disallow the operation.
----------------------------------------------
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
----------------------------------------------
Frequently it is necessary to represent a value of primitive type as if it were an object. The
wrapper classes serve this purpose.
2. 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.
Other classes in support to wrapper classes:
----------------------------------------------
Number: The Number class is the superclass of classes BigDecimal, BigInteger, Byte, Double,
Float, Integer, Long, and Short.The Subclasses of Number must provide methods to convert the
represented numeric value to byte, double, float, int, long, and short.
Character.Subset: The Character.Subset class instances represent particular subsets of the
Unicode character set. The only family of subsets defined in the Character class is
UnicodeBlock.
Character.UnicodeBlock: The Character.UnicodeBlock class is a family of character subsets
representing the character blocks in the Unicode specification. Character blocks generally define
characters used for a specific script or purpose.
----------------------------------------------
3) Math, StrictMath classes
----------------------------------------------
Math: The class Math provides commonly used mathematical functions such as sine, cosine, and
square root and basic numerical constants.
StrictMath: The StrictMath class contains methods for performing basic numeric operations such
as the elementary exponential, logarithm, square root, and trigonometric functions.
----------------------------------------------
4) String, StringBuffer and StringBuilder classes
----------------------------------------------
String: The String class represents character strings. All string literals in Java programs, such as
"abc", are implemented as instances of this class.Strings are constant, their values cannot be
changed after they are created. so that it is called as mutable.
StringBuffer: The StringBuffer class is a thread-safe, mutable sequence of characters. Following
are the important points about StringBuffer:
A string buffer is like a String, but can be modified. It contains some particular sequence of
characters, but the length and content of the sequence can be changed through certain method
calls. They are safe for use by multiple threads.
StringBuilder: The StringBuilder class is mutable sequence of characters. This provides an API
compatible with StringBuffer, but with no guarantee of synchronization.
3. ----------------------------------------------
5) Process, ProcessBuilder, Runtime, RuntimePermission classes
----------------------------------------------
Process: The Process class provides methods for performing input from the process, performing
output to the process, waiting for the process to complete, checking the exit status of the process,
and destroying (killing) the process.
ProcessBuilder: The ProcessBuilder class is used to create operating system processes.This class
is not synchronized.
Runtime: The Runtime class allows the application to interface with the environment in which
the application is running.
RuntimePermission: The RuntimePermission class is for runtime permissions. A
RuntimePermission contains a name (also referred to as a "target name") but no actions list;
you either have the named permission or you don't.
----------------------------------------------
6) Thread, ThreadGroup, ThreadLocal, InheritableThreadLocal classes
----------------------------------------------
Thread: The Thread class is a thread of execution in a program. The Java Virtual Machine
allows an application to have multiple threads of execution running concurrently. Every thread
has a priority. Threads with higher priority are executed in preference to threads with lower
priority
Each thread may or may not also be marked as a daemon. There are two ways to create a new
thread of execution. One is to declare a class to be a subclass of Thread and, the other way to
create a thread is to declare a class that implements the Runnable interface
ThreadGroup: The ThreadGroup class represents a set of threads. It can also include other thread
groups. The thread groups form a tree in which every thread group except the initial thread group
has a parent.
ThreadLocal: The ThreadLocal class provides thread-local variables.
InheritableThreadLocal: The InheritableThreadLocal 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 inheritable thread-local variables for which the parent has values.
The java.lang.Throwable class is the superclass of all errors and exceptions in the Java language.
Only objects that are instances of this class (or one of its subclasses) are thrown by the Java
Virtual Machine or can be thrown by the Java throw statement.
----------------------------------------------
4. 7) Enum, Throwable and Void classes
----------------------------------------------
Enum> : A Java Enum is a special Java type used to define collections of constants. More
precisely, a Java enum type is a special kind of Java class. An enum can contain constants,
methods etc. Java enums were added in Java 5.
Throwable: Class Throwable encompasses objects that may be thrown by the throw statement.
Subclasses of Throwable represent errors and exceptions.
Void: The Void class is an uninstantiable placeholder class to hold a reference to the Class object
representing the Java keyword void.
Solution
There are 37 classes in java.lang package as per Java SE7
The java.lang package contains classes that are fundamental to the design of the Java language.
1) Object, Class, ClassLoader, System and Compiler classes
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
3) Math, StrictMath classes
4) String, StringBuffer and StringBuilder classes
5) Process, ProcessBuilder, Runtime, RuntimePermission classes
6) Enum>, Throwable, Void classes
----------------------------------------------
1) Object, Class, ClassLoader, System and Compiler classes
----------------------------------------------
Object: The Object class is the root of the class hierarchy. Every class has Object as a
superclass. All objects, including arrays, implement the methods of this class.
Class: The Class class instance represent classes and interfaces in a running Java application.It
has no public constructor.
ClassLoader: The ClassLoader class is an object that is responsible for loading classes. This class
is an abstract class. It may be used by security managers to indicate security domains.
System: The System class contains several useful class fields and methods. It cannot be
instantiated.
Some of the facilities provided by System class are standard input, output, error output streams
and access to externally defined properties and environment variables. This class has a utility
method for quickly copying a portion of an array. Also it has methods for loading files and
libraries
Compiler: The Compiler class is provided to support Java-to-native-code compilers and related
5. services. By design, it serves as a placeholder for a JIT compiler implementation.
SecurityManager: The SecurityManager class allows applications to implement a security policy.
It allows an application to determine, before performing a possibly unsafe or sensitive operation,
what the operation is and whether it is being attempted in a security context that allows the
operation to be performed. The application can allow or disallow the operation.
----------------------------------------------
2) Wrapper classes:- Boolean, Character, Byte, Short, Integer, Long, Float, and Double
----------------------------------------------
Frequently it is necessary to represent a value of primitive type as if it were an object. The
wrapper classes 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.
Other classes in support to wrapper classes:
----------------------------------------------
Number: The Number class is the superclass of classes BigDecimal, BigInteger, Byte, Double,
Float, Integer, Long, and Short.The Subclasses of Number must provide methods to convert the
represented numeric value to byte, double, float, int, long, and short.
Character.Subset: The Character.Subset class instances represent particular subsets of the
Unicode character set. The only family of subsets defined in the Character class is
UnicodeBlock.
Character.UnicodeBlock: The Character.UnicodeBlock class is a family of character subsets
representing the character blocks in the Unicode specification. Character blocks generally define
characters used for a specific script or purpose.
----------------------------------------------
3) Math, StrictMath classes
----------------------------------------------
Math: The class Math provides commonly used mathematical functions such as sine, cosine, and
square root and basic numerical constants.
StrictMath: The StrictMath class contains methods for performing basic numeric operations such
as the elementary exponential, logarithm, square root, and trigonometric functions.
----------------------------------------------
4) String, StringBuffer and StringBuilder classes
6. ----------------------------------------------
String: The String class represents character strings. All string literals in Java programs, such as
"abc", are implemented as instances of this class.Strings are constant, their values cannot be
changed after they are created. so that it is called as mutable.
StringBuffer: The StringBuffer class is a thread-safe, mutable sequence of characters. Following
are the important points about StringBuffer:
A string buffer is like a String, but can be modified. It contains some particular sequence of
characters, but the length and content of the sequence can be changed through certain method
calls. They are safe for use by multiple threads.
StringBuilder: The StringBuilder class is mutable sequence of characters. This provides an API
compatible with StringBuffer, but with no guarantee of synchronization.
----------------------------------------------
5) Process, ProcessBuilder, Runtime, RuntimePermission classes
----------------------------------------------
Process: The Process class provides methods for performing input from the process, performing
output to the process, waiting for the process to complete, checking the exit status of the process,
and destroying (killing) the process.
ProcessBuilder: The ProcessBuilder class is used to create operating system processes.This class
is not synchronized.
Runtime: The Runtime class allows the application to interface with the environment in which
the application is running.
RuntimePermission: The RuntimePermission class is for runtime permissions. A
RuntimePermission contains a name (also referred to as a "target name") but no actions list;
you either have the named permission or you don't.
----------------------------------------------
6) Thread, ThreadGroup, ThreadLocal, InheritableThreadLocal classes
----------------------------------------------
Thread: The Thread class is a thread of execution in a program. The Java Virtual Machine
allows an application to have multiple threads of execution running concurrently. Every thread
has a priority. Threads with higher priority are executed in preference to threads with lower
priority
Each thread may or may not also be marked as a daemon. There are two ways to create a new
thread of execution. One is to declare a class to be a subclass of Thread and, the other way to
create a thread is to declare a class that implements the Runnable interface
ThreadGroup: The ThreadGroup class represents a set of threads. It can also include other thread
7. groups. The thread groups form a tree in which every thread group except the initial thread group
has a parent.
ThreadLocal: The ThreadLocal class provides thread-local variables.
InheritableThreadLocal: The InheritableThreadLocal 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 inheritable thread-local variables for which the parent has values.
The java.lang.Throwable class is the superclass of all errors and exceptions in the Java language.
Only objects that are instances of this class (or one of its subclasses) are thrown by the Java
Virtual Machine or can be thrown by the Java throw statement.
----------------------------------------------
7) Enum, Throwable and Void classes
----------------------------------------------
Enum> : A Java Enum is a special Java type used to define collections of constants. More
precisely, a Java enum type is a special kind of Java class. An enum can contain constants,
methods etc. Java enums were added in Java 5.
Throwable: Class Throwable encompasses objects that may be thrown by the throw statement.
Subclasses of Throwable represent errors and exceptions.
Void: The Void class is an uninstantiable placeholder class to hold a reference to the Class object
representing the Java keyword void.