Click to enter _ more _java FAQ-base Class Library
1. What is the function of Lang package
The Java.lang package is the core of the Java language and provides the underlying classes in Java. The basic classes include the Basic object class, the class class, the string class, the basic type of wrapper class, the basic math class, and so on. Let's introduce the Java.lang package in Java 8. Main classes such as:?
Broadly, the Java.lang package is divided into three categories: types, tools, systems, respectively, the following are the more commonly used classes:
Type
object base class
Object, which is the root class of Java.lang, is also a superclass of all classes.
class
Class, which is used to represent the types of classes and interfaces. The class object is automatically constructed by the DefineClass method in the class loader called by the JVM when it is loaded.
ClassLoader, responsible for loading classes.
Compiler, as a placeholder for the compiler, does nothing and is only used to support Java-to-native code compilers and related services.
Basic Type
The wrapper class for the base type, including Boolean, Character, Byte, short, Integer, Long, Float, Double, where the numeric type is the number class. Learn about wrappers look here: What is the basic type wrapper
String, class of strings. Understand the string look here: what is a string
- character Sequences
StringBuffer, StringBuilder, variable sequence of characters. See here: What's the difference between stringbuffer/stringbuilder?
Enumeration
Enum, which is the public base class for all enum types.
Package
Package, which contains information about the Java packages.
No type
void, which indicates a reference to a class object of the keyword void and cannot be instantiated.
iterators
Iterable, an iterative interface that implements an interface that can use iterators for object traversal.
Tools
Mathematics
Math, Strictmath, provides basic numeric operations such as exponential, logarithmic, square root, and trigonometric functions. In general, math calls the Strictmath method to complete the implementation. There is also a Java.math package in Java that mainly provides classes for performing arbitrary precision Integer Arithmetic (BigInteger) and arbitrary precision fractional arithmetic (BigDecimal).
Safety
SecurityManager, a class that allows an application to implement security policies.
Annotations
Override, the method in the markup class is the method that implements/overrides the parent class.
Suppresswarnings, cancels the warning for the flagged element. Read the Java annotations here: what are the annotations
System
Process
Process, abstract class of processes.
Processbuilder, which is used to create operating system processes.
Processenvironment, the running environment parameter of the process.
Processimpl, the implementation class for the interface.
Threads
Thread, which executes threads in the process.
Threadgroup, a thread group that represents a collection of threads. It forms a tree structure that can contain other thread groups, except for the thread group of the root node, each with a parent thread group.
ThreadLocal, provides a variable for the thread.
Run
Runnable, the interface can be run, all thread should implement it.
runtime, a runtime class that associates an application with its running environment.
Runtimepermission for run-time permissions.
Systems, many of the system-level properties and control methods are placed inside the class.
Stack
Stacktraceelement, an element in a stack trace, each of which represents a single stack frame (representing a method call).
Exception
Throwable, exception base class, all exceptions in Java inherit from it. Read more about exceptions here: What is an exception in Java
Java FAQ _09 Basic Class Library (001) _lang Package what is the function