Big Data-java Foundation -7day

Source: Internet
Author: User
Tags throw exception

Anonymous inner class

----------------------------------------------------

The inheritance of abstract classes, method overrides, and the creation of objects are combined to write

Btn.addlisener (New Abstractlisener () {

Override of Method

});

Abnormal

—------------------------------------

1.Throwable has two subclasses, exception and error

2.throw keyword can throw exception object

The 3.throws keyword throws an exception declaration at the time of the method definition

4.RuntimeException exceptions are not declared when method definitions are thrown

5. If the exception does not catch capture, it must be thrown.

6.RuntimeException exceptions can be used without tcy. .. Catch...finally to capture

7. When overridden by a method, the exception that is thrown by the parent class must be thrown as-is (subclass or itself), and no additional new exceptions can be appended

Jar Package

---------------------------------------

1. Packaging command: Jar CVF xxx.jar-c classes/. (the folder where the root package resides)

2.JAVAC-CP lib/birthday.jar;classes/-D classes Src/jardemo.java

JAVA-CP Lib/birthday.jar;classes/jardemo

3.


Big Data-java Foundation -7day

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.