Java.lang is the basic package for the Java language, and all of the default packages come in from the import to the class you write. (in alphabetical order)
1, Abstractmethoderror
- class, error
- Starting from 1.0 there are
- Inherit from Incompatibleclasschangeerror
- This error is thrown when an application attempts to invoke an abstract method. This error is typically caught by the compiler, which can only occur at run time if the definition of a class has made incompatible changes since the last compilation of the current execution method.
- With message and no parameter constructors
- There is no custom method
2, Appendable
- Interface
- Starting from 1.5 There are
- No parent interface
- Appendable is not necessarily secure for multithreaded access. Thread safety is the responsibility of the classes that extend and implement this interface.
- Provides some append functions, the return value is the Appendable interface
3, ArithmeticException
- Class, exception
- Starting from 1.0 there are
- Inherit from RuntimeException
- This exception is thrown when an operating condition of an exception occurs. For example, an integer "divided by 0" throws an instance of this class.
- With message and no parameter constructors
- No Custom function
4, ArrayIndexOutOfBoundsException
- Class, exception
- Starting from 1.0 there are
- Inherit from Indexoutofboundsexception
- The exception that is thrown when an array is accessed with an illegal index. If the index is negative or greater than or equal to the array size, the index is an illegal index.
- With message, index, parameterless constructor
- No Custom function
5, Arraystoreexception
- Class, exception
- Starting from 1.0 there are
- Inherit from RuntimeException
- Exception thrown when attempting to store an object of the wrong type to an array of objects
- With message and no parameter constructors
- No Custom function
6, Assertionerror
- class, error
- Starting from 1.4 There are
- Inherit from error
- Throwing the exception indicates that an assertion failed.
- There are 7 single parameter constructors
- No Custom function
7, Boolean
- Final class
- Starting from 1.0 there are
- Implement Java.io.serializable,comparable<boolean>
The Boolean class boolean wraps the value of the base type in an object. An Boolean object of one type contains only one boolean field of type. In addition, this class boolean String provides many methods for reciprocal conversions and provides boolean some other constants and methods that are useful for processing.
8, Byte
9, Character
- Final class
- Starting from 1.0 there are
- Achieve java.io.Serializable, comparable<character>
CharacterClass wraps a value of a base type in an object char . An Character object of type contains char a single field of type. In addition, the class provides several methods to determine the categories of characters (lowercase letters, numbers, and so on), and to convert characters from uppercase to lowercase, and vice versa.
10, Charsequence
11, Class<t>
- Final class
- Starting from 1.0 there are
- Realized the java.io.Serializable, genericdeclaration,type,annotatedelement
ClassInstances of the class represent classes and interfaces in a running Java application. An enumeration is a class, and annotations are an interface. Each array belongs to a class that is mapped to a class object, and all arrays that have the same element type and number of dimensions share the Class object. The basic Java types (,,,,,, boolean byte char short int long float and double ) and keywords void are also represented as Class objects.
ClassThere is no public constructor method. Classobjects are constructed automatically by the Java virtual machine and by calling methods in the class loader when the class is loaded defineClass .
- There are a series of functions that manipulate class.
12, ClassCastException
13, Classcircularityerror
14, Classformaterror
15, ClassLoader
- Abstract class
- Starting from 1.0 there are
- No parent classes and interfaces
The class loader is the object that is responsible for loading the class. The ClassLoader class is an abstract class. If a binary name is given to a class, the ClassLoader attempts to find or generate the data that makes up the class definition. The general strategy is to convert the name to a file name and then read the class file for that name from the file system. Each Class object contains a pair of ClassLoader that define it 引用 .
16, ClassNotFoundException
- Class, exception
- Starting from 1.0 there are
- Inherit Reflectiveoperationexception
When an application tries to load a class with a string name by using the following method, a method in a class, a method in a class, Class forName ClassLoader findSystemClass ClassLoader a method in a class loadClass , but the definition of a class with the specified name is not found.
17, Cloneable
18, Clonenotsupportedexception
- Exception class
- Starting from 1.0 there are
- Inherit from exception
ObjectThis exception is thrown when a method in the calling class clone copies an object, but the object's class does not implement an Cloneable interface. clonean application that overrides the method may also throw this exception, indicating that an object cannot or should not be copied.
19, Comparable<t>
20, Compiler
21, Double
- Final class
- Starting from 1.0 there are
- Integration from number to implement Comparable<double>
DoubleClass wraps a value of a base type in an object double . Each Double type of object contains one double type of field. In addition, the class provides several methods that can be double converted to String , String converted to double , and also provide some other double useful constants and methods for processing.
22, Enum<e extends enum<e>>
23, Enumconstantnotpresentexception
24. Error
- class, error
- Starting from 1.0 there are
- Inherit Throwable
Erroris a Throwable subclass that is used to indicate a serious problem that a reasonable application should not attempt to capture. Most of these errors are exception conditions. Although the ThreadDeath error is a "normal" condition, it is also a Error subclass, because most applications should not attempt to capture it. During the execution of this method, you do not need to declare in its throws clauses any subclasses that might have been thrown but could not be caught Error , because these errors could be exceptions that would never happen again
25, Exception
26, Exceptionininitializererror
27, Float
- Final class
- Starting from 1.0 there are
- Inherit number, implement Comparable<float>
FloatClass wraps a value of a base type in an object float . An Float object of type contains a float field of type. In addition, this class provides several ways to float convert types and String types to each other, as well as float other constants and methods that are useful when working with types.
28, Illegalaccessexception
- Exception class
- Starting from 1.0 there are
- Inherit exception
Illegalaccessexception is thrown when an application attempts to create a reflexive instance (rather than an array), sets or gets a field, or invokes a method, but the currently executing method cannot access the definition of the specified class, field, method, or construction method.
29, IllegalArgumentException
30, Illegalmonitorstateexception
31, IllegalStateException
32, Illegalthreadstateexception
33, Incompatibleclasschangeerror
34, Indexoutofboundsexception
- Exception class
- Starting from 1.0 there are
- Inherit RuntimeException
Indicates that a sorted index (for example, sorting an array, string, or vector) is out of range when thrown. The application can create subclasses for this class to indicate similar exceptions.
35, Inheritablethreadlocal<t>
- Class
- Starting from 1.2 There are
- Inherit threadlocal<t>
The class extends the ThreadLocalto provide a value inherited from the parent thread for the child thread: When the child thread is created, the child thread receives the initial value of all inheritable thread local variables to get the value that the parent thread has. Typically, the value of a child thread is consistent with the value of the parent thread, but by overriding the Childvalue method in this class, the child thread's value can be an arbitrary function of the parent thread's value. When the per-thread property (Per-thread-attribute) that is maintained in a variable (such as user ID and transaction ID) must be automatically passed to all child threads created, the inheritable thread local variables should be used as much as possible, rather than normal thread local variables.
36, Instantiationerror
37, Instantiationerror
38, Instantiationexception
- Class, exception
- Starting from 1.0 there are
- Inherit exception
This exception is thrown when an application attempts to Class newInstance create an instance of a class using a method in the class, and the specified class object cannot be instantiated. There are many reasons for instantiating failures, including but not limited to the following: class objects represent an abstract class, interface, array class, base type,void,类没有非 null 构造方法
39, Integer
- Final class
- Starting from 1.0 there are
- Inherit number, implement Comparable<integer>
IntegerClass wraps a value of a primitive type in an object int . An Integer object of type contains a int field of type. In addition, the class provides several methods that can be int String converted between types and types, as well as int other constants and methods that are useful when handling types.
39, Internalerror
40, Internalerror
Jdk_api Anatomy of the Java.lang pack