Phase 1 Language Basics + Advanced _1-3-Java language senior _05- abnormal and multi-threaded _ _2_ abnormal abnormal Section 1 classification





Date conversion here is abnormal. Here it must be to deal with exceptions.

Mouse put up Alt + Enter

This is the first way, the exception is thrown away, and delivered a virtual machine for processing

once the strings have a problem.

When the program runs, it will remove the unusual.

Virtual machine processing is to interrupt the program, the abnormal printed on the console

try/catch





Benefits after try / catch, and exception handling, the program can continue.

Or throw an exception, but also follow the code output out.

Runtime exception



Overindexing



output is the above exception code

Error Error


Memory overflow error.







 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11247613.html