Two graphs interpreting Java exceptions and assertions
--Reprint Please specify Source: Coder-pig
Introduction to this section:
Published the day before yesterday "seven map to parse Java multithreading" Everyone's response is good, ah, today, two more,
About Java exceptions and assertions, the things that are involved are:
① what is an exception, why there are exceptions, exception handling mechanism model, common exception information summary, test anomalies and non-test anomalies;
Exception capture: Try-catch block, finally block, multiple catch block, try-catch block nesting;
Exception declaration: throws avoidance exception;
Exception thrown: Throw explicitly throws an exception, custom exception
② What are assertions, the benefits of introducing assertions, the use of assertions, opening and closing assertions, and simple assertions using examples
The content is quite rich, two graphs contain all of the above content ~
The text of this section:
Java Exceptions and assertions ①:
Java Exceptions and assertions ②:
finally say two words:
Well, Java exceptions and assertions are so simple, it is recommended to print out Oh ~
In addition, if you think the picture is not very clear, you can go to ProcessOn to find my picture:
https://www.processon.com/i/53689bdb0cf21db1c3ea337e
Homepage There can be found, of course processon This tool is good, if you are interested can use!
Finally, if there is any mistake or wrong place, or suggestion, welcome to point out, very grateful ~ and you think
Good words, spend 0.1s a praise, let more friends see good?
Two graphs interpreting Java exceptions and assertions