Beginners To learn Java, is javase, every day I learn from the day and notes, I hope you can criticize and advice, and promote common progress! Ten!

Source: Internet
Author: User
Day10
  1. Finally: In exception handling, the code that is placed in the finally is the code that is bound to be executed. Typically used to close a resource.
  2. try{};finally{} can exist, in which case no catch is an exception that is not handled and must be declared if the exception is not a run-time exception.
  3. The exception is reflected in the child parent class overlay: When a subclass overrides a parent class, if a method of the parent class throws an exception, the child class's overriding method can only throw the exception of the parent class or the subclass of the exception. If the parent class method has multiple exceptions, the child class can only throw a subset of the parent exception when it overrides the method. That is, if the parent class or interface does not throw an exception, then the child class overrides the method, and the exception cannot occur, and if an exception occurs, it must be processed in the subclass.
  4. Package: The class file is categorized and managed. Provides a multilevel namespace for a class. Write in the first line of the program file. The name of the class is the package name. Class name. Packages are also a form of encapsulation.

Beginners To learn Java, is javase, every day I learn from the day and notes, I hope you can criticize and advice, and promote common progress! Ten!

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.