201671010114 2016-2017-2 "Java Programming" Nineth Week study Summary

Source: Internet
Author: User

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

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.