This week has learned about exceptions and assertions, and it is easier and more manageable to call the system to customize the exception class. But when you define an exception class, you don't know what to do when you use it. In the last experiment, when the first character in the name is a number, there is a problem in catching the exception, writing the code but not the result. Results of less than 0 and greater than 100 can come out, but the format is not very correct. I hope the teacher can speak. This week's content is divided into checked and unchecked exceptions, and for checked exceptions, you must declare an exception to be thrown or catch an exception in your code, or the program will not run. Without checking the exception, the program will directly error after running, we can also directly in the program to correct to avoid this error. In a catch exception, if no exception occurs in the TRY statement, the statement in the catch is not executed and the statement immediately following it is executed. If an exception occurs, the statement in the catch is executed before the statement executes. assertions apply only to development and testing is used. In this programming work found that the previous knowledge a little forgotten, in the back will be mended. There are some deficiencies in the use of knowledge.
201671010114 2016-2017-2 "Java Programming" Nineth Week study Summary