The Code is as follows [java] public class TestException {public static void main (String [] args) {try {// throw new Exception ("Nothing "); throw new Error ("nothing"); // switch the two rows to try ??} Catch (Exception e) {System. out. println ("caught Exception .. "); E. printStackTrace (System. err);} finally {System. out. println (" finally statement .. ");} // Code after System. out. println (" try external code... ") ;}}Note: 1. try means to execute the statements in the try. If an Exception is thrown inside the try, the catch part will be executed, as well as the statements outside the try. 2. If an Error occurs inside the try, it indicates an Error. The subsequent statements are not executed, and the catch cannot be captured. 3. however, if there is a finally block, finally will almost certainly be executed, but here there is a sequential problem, the finally block and print exception stack will be executed in another thread, so the order of printing is interesting. 4. If you execute System. exit (0) in try or catch, finally will not be executed. In addition, whether it is Error or return, finally blocks will be executed. 5. You are advised to copy the code or write a copy of the code for execution.