SlideShare a Scribd company logo
1 of 7
Download to read offline
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 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.
----------------------------------------------
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.
----------------------------------------------
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
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
----------------------------------------------
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
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.

More Related Content

Similar to There are 37 classes in java.lang package as per Java SE7 The java.pdf

Java tutorials
Java tutorialsJava tutorials
Java tutorials
saryu2011
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming Language
YLTO
 

Similar to There are 37 classes in java.lang package as per Java SE7 The java.pdf (20)

Java J2EE Interview Questions Part-1
Java J2EE Interview Questions Part-1Java J2EE Interview Questions Part-1
Java J2EE Interview Questions Part-1
 
Java J2EE Interview Questions Part-1
Java J2EE Interview Questions Part-1Java J2EE Interview Questions Part-1
Java J2EE Interview Questions Part-1
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Java threads
Java threadsJava threads
Java threads
 
Unit3 packages & interfaces
Unit3 packages & interfacesUnit3 packages & interfaces
Unit3 packages & interfaces
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
Fundamental classes in java
Fundamental classes in javaFundamental classes in java
Fundamental classes in java
 
java basic .pdf
java basic .pdfjava basic .pdf
java basic .pdf
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Java tutorials
Java tutorialsJava tutorials
Java tutorials
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming Language
 
Lecture 8 Library classes
Lecture 8 Library classesLecture 8 Library classes
Lecture 8 Library classes
 
core java for hadoop
core java for hadoopcore java for hadoop
core java for hadoop
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)
 
Java interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council PuneJava interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council Pune
 
Javainterview
JavainterviewJavainterview
Javainterview
 

More from aparnatiwari291

Event Cash Flow   Assets Claims Income Statement OAIAFA Cash.pdf
    Event Cash Flow   Assets  Claims Income Statement    OAIAFA Cash.pdf    Event Cash Flow   Assets  Claims Income Statement    OAIAFA Cash.pdf
Event Cash Flow   Assets Claims Income Statement OAIAFA Cash.pdf
aparnatiwari291
 
Benzoin and methanol both have an alcohol group, .pdf
                     Benzoin and methanol both have an alcohol group, .pdf                     Benzoin and methanol both have an alcohol group, .pdf
Benzoin and methanol both have an alcohol group, .pdf
aparnatiwari291
 
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdfThe solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
aparnatiwari291
 

More from aparnatiwari291 (20)

When two data sets are pooled together the pooled mean will alway.pdf
 When two data sets are pooled together the pooled mean will alway.pdf When two data sets are pooled together the pooled mean will alway.pdf
When two data sets are pooled together the pooled mean will alway.pdf
 
DELTOID flexes and medially rotates arm; prime mover of arm abduct.pdf
  DELTOID  flexes and medially rotates arm; prime mover of arm abduct.pdf  DELTOID  flexes and medially rotates arm; prime mover of arm abduct.pdf
DELTOID flexes and medially rotates arm; prime mover of arm abduct.pdf
 
Event Cash Flow   Assets Claims Income Statement OAIAFA Cash.pdf
    Event Cash Flow   Assets  Claims Income Statement    OAIAFA Cash.pdf    Event Cash Flow   Assets  Claims Income Statement    OAIAFA Cash.pdf
Event Cash Flow   Assets Claims Income Statement OAIAFA Cash.pdf
 
We know that Molarity = No . of moles Volume of.pdf
                     We know that Molarity = No . of moles  Volume of.pdf                     We know that Molarity = No . of moles  Volume of.pdf
We know that Molarity = No . of moles Volume of.pdf
 
there are no molecules given..pls repost and post.pdf
                     there are no molecules given..pls repost and post.pdf                     there are no molecules given..pls repost and post.pdf
there are no molecules given..pls repost and post.pdf
 
The false statement is Oxygen forms binary compou.pdf
                     The false statement is Oxygen forms binary compou.pdf                     The false statement is Oxygen forms binary compou.pdf
The false statement is Oxygen forms binary compou.pdf
 
the concentration is 0.1550 .pdf
                     the concentration is 0.1550                      .pdf                     the concentration is 0.1550                      .pdf
the concentration is 0.1550 .pdf
 
The area is how many Hydrogens are on the graph. .pdf
                     The area is how many Hydrogens are on the graph. .pdf                     The area is how many Hydrogens are on the graph. .pdf
The area is how many Hydrogens are on the graph. .pdf
 
SO4{2-} (aq) + Sn{2+} (aq) + 4 H{+} (aq)=========.pdf
                     SO4{2-} (aq) + Sn{2+} (aq) + 4 H{+} (aq)=========.pdf                     SO4{2-} (aq) + Sn{2+} (aq) + 4 H{+} (aq)=========.pdf
SO4{2-} (aq) + Sn{2+} (aq) + 4 H{+} (aq)=========.pdf
 
oxygen double bond oxygen .pdf
                     oxygen double bond oxygen                        .pdf                     oxygen double bond oxygen                        .pdf
oxygen double bond oxygen .pdf
 
Once HCl is added in solution, the ions would dis.pdf
                     Once HCl is added in solution, the ions would dis.pdf                     Once HCl is added in solution, the ions would dis.pdf
Once HCl is added in solution, the ions would dis.pdf
 
its e1 OMe attacks at 3-position by transfer of a.pdf
                     its e1 OMe attacks at 3-position by transfer of a.pdf                     its e1 OMe attacks at 3-position by transfer of a.pdf
its e1 OMe attacks at 3-position by transfer of a.pdf
 
H and F are identical, you just need to rotate H .pdf
                     H and F are identical, you just need to rotate H .pdf                     H and F are identical, you just need to rotate H .pdf
H and F are identical, you just need to rotate H .pdf
 
From weakest to strongest A, B, C Butanal is an .pdf
                     From weakest to strongest A, B, C Butanal is an .pdf                     From weakest to strongest A, B, C Butanal is an .pdf
From weakest to strongest A, B, C Butanal is an .pdf
 
Effusion is inversely proportional to the mass. .pdf
                     Effusion is inversely proportional to the mass.  .pdf                     Effusion is inversely proportional to the mass.  .pdf
Effusion is inversely proportional to the mass. .pdf
 
Benzoin and methanol both have an alcohol group, .pdf
                     Benzoin and methanol both have an alcohol group, .pdf                     Benzoin and methanol both have an alcohol group, .pdf
Benzoin and methanol both have an alcohol group, .pdf
 
When acid and base react together they form salt and water.This reac.pdf
When acid and base react together they form salt and water.This reac.pdfWhen acid and base react together they form salt and water.This reac.pdf
When acid and base react together they form salt and water.This reac.pdf
 
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdfThe solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
The solution is as belowEmployeeDemo.javaimport java.util.Scann.pdf
 
The precations to be given to the workers areSolutionThe prec.pdf
The precations to be given to the workers areSolutionThe prec.pdfThe precations to be given to the workers areSolutionThe prec.pdf
The precations to be given to the workers areSolutionThe prec.pdf
 
At 1700 cm-1 a strong signal in an IR spectum is .pdf
                     At 1700 cm-1 a strong signal in an IR spectum is .pdf                     At 1700 cm-1 a strong signal in an IR spectum is .pdf
At 1700 cm-1 a strong signal in an IR spectum is .pdf
 

Recently uploaded

Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
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.