Discover java built in exceptions, include the articles, news, trends, analysis and practical advice about java built in exceptions on alibabacloud.com
This article focuses on some concepts of exception mechanisms in Java. The purpose of writing this article is to help me remember these things quickly after a long time. 1. Exception mechanism 1.1 The exception mechanism refers to how the program
This article focuses on some concepts of exception mechanisms in Java. The purpose of this article is to make it easy for me to remember these things quickly after a long time.
1. Abnormal mechanisms
The 1.1 exception mechanism refers to how the
Throwable is the parent of error handling in all Java programs, and there are two types of assets: Error and Exception.Error: Indicates an unexpected fault detected by the JVM, because this is a serious error at the JVM level, which prevents the JVM
Built-in exception subclass
In the standard package Java.lang, Java defines a number of exception classes. Some of these have been used in the previous example. These exceptions are typically subclasses of the standard class runtimeexception.
I. Concepts of understanding anomalies and handling exceptionsAn exception is an abnormal event that occurs during the course of a program's operation, and it interrupts a running program.Exception is not an errorThe key position in the program has
In standard package Java.lang, Java defines a number of exception classes. Some of the previous examples have been used. These exceptions are generally subclasses of the standard class runtimeexception. Since Java.lang is actually introduced by all
1. Exception mechanism1.1 exception mechanism refers to how the program handles when a program error occurs. Specifically, the exception mechanism provides a secure channel for program exits. When an error occurs, the process of executing the
?
The runtime environment of the C ++ language is a stack-based environment. The trace stack is used to track and print the called functions, variables, and return addresses when the program is running, the stack trace in the C ++ exception is to
What is an exceptionWhen the program runs, unexpected events occur that prevent the program from executing as expected by the programmer, which is an exception. When the exception occurs, is any program to fend for itself, immediately quit
Document directory
Java. lang. Throwable
Java. lang. Error
Java. lang. Exception
Java. lang. RuntimeException
Generally, exceptions in Java are divided into three types:
Error: this exception is designed not to be captured because it is
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.