Java. lang Package Overview (5)

Source: Internet
Author: User
Java. Lang. Exception
Root exception. Used to describe what the application wants to capture.
Java. Lang. illegalaccessexception
Illegal access exception. When an application tries to create an instance of a class, access this class attribute, and call this class method through reflection, at that time, the exception could not be thrown when defining the category, attribute, method, or constructor.
Java. Lang. illegalmonitorstateexception
Illegal monitoring status exception. This exception is thrown when a thread tries to wait for a monitor of an object (o) that it does not own or notifies other threads to wait for the monitor of this object (o.
Java. Lang. illegalstateexception
Illegal status exception. If a method is called while the Java environment and application are not in the valid call state of a method, this exception is thrown.
Java. Lang. illegalthreadstateexception
The invalid thread status is abnormal. When the thread is not in the valid call status of a method and the method is called, an exception is thrown.
Java. Lang. indexoutofboundsexception
An exception occurred when the index was out of bounds. This exception is thrown when the index value for accessing a sequence is smaller than 0 or greater than or equal to the sequence size.
Java. Lang. instantiationexception
Instantiation exception. This exception is thrown when an instance of a class is created using the newinstance () method and the class is an abstract class or interface.
Java. Lang. interruptedexception
Aborted exception. This exception is thrown when a thread is in a long wait, sleep, or other pause State and other threads terminate the thread through the interrupt method of the thread.
Java. Lang. negativearraysizeexception
An error occurred while the array size is negative. This exception is thrown when an array is created with a negative value.
Java. Lang. nosuchfieldexception
The property does not exist. This exception is thrown when you access a non-existent attribute of a class.
Java. Lang. nosuchmethodexception
Method does not have an exception. This exception is thrown when a method that does not exist to access a class.
Java. Lang. nullpointerexception
Null Pointer exception. This exception is thrown when the application tries to use null where the object is required. For example, call the instance method of the null object, access the attribute of the null object, calculate the length of the null object, and throw null using the throw statement.
Java. Lang. numberformatexception
The number format is incorrect. This exception is thrown when you try to convert a string to a specified numeric type that does not meet the numeric type requirements.
Java. Lang. runtimeexception
Exception during running. It is the parent class of all exceptions that can be thrown during normal operations of Java virtual machines.
Java. Lang. securityexception
Security exception. Thrown by the security manager to indicate exceptions that violate security conditions.
Java. Lang. stringindexoutofboundsexception
An exception occurred when the string index was out of bounds. If the index value is used to access a character in a string and the index value is smaller than 0 or greater than or equal to the sequence size, this exception is thrown.
Java. Lang. typenotpresentexception
Class
Type. When an application attempts to access a type by using a string expression of a type name, but cannot find the type based on the given name, this exception is thrown. This exception corresponds
The difference between classnotfoundexception and classnotfoundexception is that the exception is unchecked (not checked ),
Is a checked (checked) exception.
Java. Lang. unsupportedoperationexception
The method is not supported. Exception that indicates that the requested method is not supported.

V. Errors
Java. Lang. abstractmethoderror
Incorrect abstract method. Thrown when an application tries to call an abstract method.
Java. Lang. assertionerror
Assertion error. Used to indicate an assertion failure.
Java. Lang. classcircularityerror
Class loop dependency error. When initializing a class, if the cyclic dependency between classes is detected, this exception is thrown.
Java. Lang. classformaterror
Class format error. When the Java Virtual Machine attempts to read a Java class from a file and detects that the content of the file does not conform to the valid format of the class, it throws.
Java. Lang. Error
Error. Is the base class for all errors, used to identify serious program running problems. These problems usually describe abnormal situations that should not be captured by the application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.