Selasa, 07 Januari 2025

Import Java Package

The java.lang and java.util packages provide basic functionality that is used by almost all applications. Provides classes that are fundamental to the design of the Java programming language such as String, Math, and basic runtime support for threads and processes. In Java programming language java.lang package is a built-in package or we can say it’s a package included in Java by default. Since java.lang is a default package there is no need to import the package.

Here we have a list of some useful classes or interfaces list.
  1. import java.lang.Class class
  2. import java.lang.ClassLoader class
  3. import java.lang.Error class
  4. import java.lang.Exception class
  5. import java.lang.Math class
  6. import java.lang.Object class
  7. import java.lang.Runnable; interface
  8. import java.lang.Runtime class
  9. import java.lang.RuntimeException class
  10. import java.lang.String class
  11. import java.lang.StringBuffer class
  12. import java.lang.StringBuilder class
  13. import java.lang.System class
  14. import java.lang.Thread class
  15. import java.lang.Throwable class
Java provides class for every primitive data type which is called Wrapper Class. All the wrapper classes are also available in java.lang package.
  1. java.lang.Byte class [for byte primitive data type]
  2. java.lang.Short class [for short primitive data type]
  3. java.lang.Integer class [for int primitive data type]
  4. java.lang.Long class [for long primitive data type]
  5. java.lang.Float class [for float primitive data type]
  6. java.lang.Double class [for double primitive data type]
  7. java.lang.Boolean class [for boolean primitive data type]
  8. java.lang.Character class [for char primitive data type]

Related Post


Tidak ada komentar:

Posting Komentar

Various Other Posts