TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    Java Tutorials

    java.lang Package

    Overview

    In this tutorial, we will learn about java.lang Package. A Java package is a collection of related classes, interfaces, sub-packages, and other object-oriented types that are grouped together.

    Note that: The Java language specification also provides a class called

    java.lang.Package which provides version information about the implementation of a Java package.

     

    java.lang Package

    java.lang Package

    The java.lang Java package is the default package. It provides classes that are fundamental and basic to the design of the Java Programming Language such as String, Math, class wrappers for primitive types and runtime support for threads. There is no need to import this package explicitly into the Java program.

    Interfaces

    Some interfaces in the package are:

    • Cloneable
    • Runnable
    • Readable
    • Appendable

    Classes

    Some other classes that are provided in the package are as follows:

    Object class is the root of the Java class hierarchy. Every class has Object as the superclass. All objects in Java, implement the methods of this class.

    Class instances of this class represent the classes at run time during Java program execution.

    Class wrappers for primitive data types like:

    • Boolean
    • Byte
    • Character
    • Integer
    • Float
    • Long
    • Double

    Useful classes like:

    • Object
    • Class
    • ClassLoader
    • Runtime
    • SecurityManager
    • Math
    • String
    • StringBuffer
    • StringBuilder
    • System
    • Thread
    • ThreadGroup
    • Process
    • Void
    • Error
    • Exception
    • Package
    • Module, etc

    Classes ClassLoader, Process, Runtime, SecurityManager, and System provide system operations. These classes manage the dynamic loading of Java Classes, the Creation of external processes, the enforcement of security policies, etc.

    Class Throwable is the superclass of all errors and exceptions in Java programs. JVM can only throw objects of the Throwable class.

    Sub Packages

    Some of the sub-packages of java.lang Package is as follows:

    • annotation
    • invoke
    • constant
    • module
    • management
    • ref
    • reflect
    • runtime, etc

     

     

    —

    Java Tutorials

    Java Tutorial on this website:

    https://www.testingdocs.com/java-tutorial/

    For more information on Java, visit the official website :

    https://www.oracle.com/java/

    Related Posts

    Java Performance

    Java Tutorials /

    Improving Java Performance with Multithreading

    Download Greenfoot Windows

    Java Tutorials /

    Download & Install Greenfoot on Windows

    Java Tutorials /

    Java Static Code Analysis

    Java Tutorials /

    Java Testing Tools

    Java Tutorials /

    Handle Multiple Exceptions in Java

    ‹ Java Heap vs Stack› java.util Package

    Recent Posts

    • Running Tests in Parallel with Selenium Grid
    • Advanced Selenium Features
    • Locating Web Elements
    • Running the Test Script
    • Writing Your First Selenium Test Script
    • Getting Started with Selenium Automation Testing
    • Setting Up the Environment
    • How can you monitor the Quality Assurance Audit?
    • Leveraging LambdaTest with Appium 2.0
    • Appium 2.0 Plugins ListAppium 2.0 Plugins
    • Touch Actions and Multi-Touch Actions
    • Changes in Drivers and Classes
    • Appium Inspector
    • Capabilities in Appium 2.0
    • Appium 2.0 Driver ListAppium 2.0 Driver Installation & Management
    CyberLink Multimedia Software

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com