CoderSathi
  • Tutorial
    • Java Tutorial
    • Swing Tutorial
    • JDBC Tutorial
    • Java String Tutorial
    • Servlet and JSP Tutorial
  • Mongo DB
  • AWS
  • DevOps
  • Linux
  • Git
Home > Java > java.lang Package

Java Tutorial

  • Introduction
    • What is Java
    • History Of Java
    • Install Java
    • What is JVM
    • JDK vs JRE vs JVM
    • Java Bytecode
    • OOP vs POP
    • Compile and Run Java
  • Tokens, Expressions and Control Structures
    • Primitive data types
    • Integers
    • Floating Points
    • Characters
    • Booleans
    • User Defined Data Type
    • Declarations
    • Constants
    • Identifiers
    • Literals
    • Type Conversion and Casting
    • Variables
    • Default Variable Initialization
    • Command Line Arguments
    • Arrays of Primitive Types
    • Comment Syntax
    • Garbage Collection
    • Expressions
    • Operators
    • Arithmetic Operator
    • Bitwise and Shift Operator
    • Comparison or Relational Operators
    • Logical Operators
    • Assignment Operators
    • Ternary Operator
    • Increment and Decrement Operator
    • Control Statements
  • OOP Concepts
    • Class and Object
    • Create Class Instance
    • Method
    • Abstraction
    • Encapsulation
    • this keyword
    • Constructor
    • Pass by Value
    • Access Modifier/Control
    • Polymorphism
    • Method Overloading vs Method Overriding
    • Recursion
    • Nested and Inner Class
  • Inheritance and Packaging
    • Inheritance
    • extends Keyword
    • super Keyword
    • Object Class
    • Abstract class
    • Final Class
    • Java Package
    • Interface
  • Handling Error/ Exceptions
    • What is Exception
    • Exception Handling Keywords
    • Common Java Errors
    • User Defined Exception
    • Throwing and re-throwing Exception
    • finally Block
  • Strings
    • Java String Tutorial
  • Threads
    • Introduction
    • Create Thread
    • Thread Lifecycle
    • Thread Priority
    • Thread Synchronization
    • Inner Thread Communication
    • Thread Deadlock
  • IO and Streams
    • java.io Package
    • Files and Directories
    • Byte Stream
    • Character Stream
    • Console Input and Output
    • Serializable and Deserializable
  • Core Packages
    • java.lang Package
    • Math
    • Wrapper Classes
    • java.lang.Number
    • Double
    • Float
    • Integers
    • java.lang.Byte
    • java.lang.Short
    • java.lang.Long
    • java.lang.Character
    • java.lang.Boolean
    • java.util package
    • Vector Class
    • Stack Class
    • Dictionary Class
    • Hashtable
    • Enumeration or Enum
    • Generate Random Number
  • Holding Collection of Data
    • Arrays
    • Map
    • List
    • Set
    • Collection Interface
    • Collections Class
    • ArrayList
    • HashSet
    • TreeSet
    • Comparator
  • Java Bean
    • What is Java Bean
    • Advantages and Disadvantages of Java Bean
    • Java Beans API
    • Introspection
    • Java Bean Properties
    • Bound and Constrained Properties
    • BeanInfo Interface
    • Customizers
    • Java Beans Persistence
    • BeanDescriptor
  • Home

java.lang Package

Learn the concepts, implementation details, and practical steps with a clean developer-focused walkthrough.

Yuba Raj Kalathoki
By Yuba Raj Kalathoki
Last updated: July 1, 2026 · 2 min read · 0 Comments
Share: in X

The java.lang package is a part of the Java Standard Library and contains a number of core Java classes that are used in almost all Java programs. These classes include fundamental data types, basic input and output functions, and essential system functions.

Commonly used classes in java.lang package

Some of the most commonly used classes in the java.lang package are:

  • Object: The root class of the Java class hierarchy. All Java classes inherit from Object, which provides basic methods such as equals, hashCode, and toString.
  • Class: Represents the class of an object. The Class class provides methods for getting information about a class, such as its name, its superclass, and the interfaces it implements.
  • String: A class that represents character strings. Strings are immutable, meaning that once they are created, they cannot be modified.
  • Math: A class that provides basic math functions such as trigonometric functions, logarithms, and square roots.
  • System: A class that provides access to system resources, such as standard input and output streams and the current time.
  • Thread: A class that represents a thread of execution. A thread is a separate flow of control within a program, and the Thread class provides methods for creating and manipulating threads.
  • Throwable: The base class for all exceptions and errors in Java. It provides methods for printing the stack trace of an exception and for obtaining the cause of an exception.

The java.lang package also includes a number of wrapper classes for primitive data types, such as Integer for int, Long for long, and Boolean for boolean. These wrapper classes provide methods for converting between primitive types and their corresponding wrapper types, as well as for performing basic operations such as parsing strings and comparing values.

Overall, the java.lang package is an essential part of the Java Standard Library, providing a wide range of basic functions that are used in almost all Java programs.

Related Posts:

  • Control Statements in Java
  • MySQL Commands for Developers
  • Object Class in Java – The Root of All Classes
  • What Is Java Swing? A Complete Guide to Java’s GUI Toolkit
  • Packages in Java: A Guide to Modular, Maintainable Code
  • Install and Set Up Java Development Environment
Tags:javalanguage-fundamentals
Was this article helpful?
← Previous ArticleMatteBorder in Java Swing
Next Article →A Simple Servlet Program in Java

Recent Posts

  • How to implement Passwordless Authentication in Spring Boot: A Step-by-Step Guide
  • How to Use AWS CloudFront Signed URLs in Spring Boot?
  • How to Fix SSH Agent Forwarding on macOS: The Ultimate Guide for Developers
  • How to Read AWS Secrets Manager in Spring Boot (Step-by-Step)
  • How to Fix “Public Key Retrieval is not allowed” MySQL JDBC Error
CoderSathi

Your go-to resource for Java, Spring Boot, Microservices, AWS, and modern development tutorials.

Linkedin

Quick Links

  • About
  • Contact

Popular Topics

  • Java
  • Spring Boot
  • AWS
  • DevOps
  • MongoDB
  • Linux
  • Git
  • How to
© 2026 CoderSathi. All rights reserved. Privacy Policy · Sitemap