1. Preface Try...catch...finally I'm afraid it's a familiar statement, and it's very simple to use, logically it seems to be easy to understand. However, I personally experience the "lesson" tells me that this thing is not as simple as the
1. Background Introduction
Why do you want to do exception handling?
For a computer program, no one can guarantee that it will run without error, the main source of error is the following:
Code Error
User illegal input
Device errors
A Java exception architecture
Java.lang.Object----java.lang.Throwable--------Java.lang.Exception------------java.lang.RuntimeException--------Java.lang.Error------------Java.lang.ThreadDeath
The Throwable class is a superclass of all errors or
0. Why the exception handling mechanism should be introduced.
Before the exception mechanism is introduced, the exception is handled using If...else,sysout and Syserror methods. Exception handling is a very important aspect of program design, but
Introduction to exceptions and errors in java learning, exception capturing, exception throwing, custom exceptions, finally keywords (small records in java learning), and finally keywords
Introduction to exceptions and errors in java learning,
Read Catalogue
First, Exception introduction
Second, try-catch-finally statement
Iii. Throw and Throws keywords
Four, the exception chain in Java
V. Concluding remarks
Java exception and exception handling back to top
Exception handling is a very important aspect of program design, but also a great difficulty in programming, starting from C, you may already know how to use if...else ... To control the exception, may be spontaneous, however, this control is
first, Exception IntroductionWhat is an exception?An exception is something that is different from the norm and is not the same as the normal Situation. In java, the case of blocking the current method or scope is called an Exception.What is the
OverviewIn general, enterprise-level applications are corresponding to complex business logic, in order to ensure the robustness of the system, it is necessary to face a variety of system business anomalies and run-time anomalies.Bad exception
Oracle Developer is famous for its rapid data processing and development, and its exception handling mechanism is also relatively complete.
1. Advantages of exceptions
If no exception occursProgramCheck whether each command succeeds or fails,
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.