Try-catch in-depth understandingLet's look at an example (example 1) to explain the process of try, catch, finally in Java
1234567891011121314151617181920212223
publicclassTryCatchFinally
1. Throws appears in the method function head, can be used alone, and throw appears in the function body, can not be used alone, throw or try-catch-finally statement supporting use, or with throws matching use.2.throws is basically declaring that
First, prefaceThere was a question in the interview some days ago: Public class Test { Public Static void Main (string[] args) { try { return; } finally { System.out.println ("finally ...");}}
Hi, everybody good evening, my blog first beginning, let's cheer together!All say the Java language is very robust, such as: garbage collection mechanism, memory model, exception handling, strong type conversion, cross-platform, and so on, so that
Let's take a look at an example
Note that:
AddEventListener and attachevent difference in the first argument the former is click the latter is the onclick
AddEventListener is running in the element scope where the element is
Before learning and using guava optional, let's take a look at null in Java. Because, only by having a deep understanding of null, can we gain a deeper understanding of guava's optional design and usage in elegance and simplicity.
Null
Summarized the following error capture methods: Try catch, @ error, raiserror
This is an exception handling during database conversion,
Begin try InsertIntoSDT. DBO. dyemplosttm (logdate, prodgroup, shiftcode, employeeno, Mono,Opno, otflag,
Listen to the teacher said, in the later study most of the anomalies are null pointer anomalies. So take a little time to play the game to check what is a null pointer exception
One: The main causes of NULL pointer anomalies are as follows:
(1)
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.