"Song Hongkang Learning Diary 18" interface

Source: Internet
Author: User

One interface
The 1 interface can be seen as an abstract class, a function that consists of a constant (public static final decoration) and an abstract method (public abstract decoration)
Interface aa{
(public static final) int age;
(public abstract) void method ();
}
2 Interfaces and interfaces: Inheritance relationships, multiple inheritance. Interface AA extends bb,cc{}
Classes and interfaces: Implementing relationships, multiple implementations. Class AA implements bb,cc,dd{}
Classes and classes: inheritance, multiple inheritance. Class AA extends bb{}
3 interfaces without constructors;
Class 4 implements an interface to be instantiated by overriding the interface's abstract method;
Otherwise, it is still an abstract class.

The design pattern of the factory method of two interfaces: The design interface class defines an abstract method, which is given to the subclass implementation.
Three-agent mode: When the proxy class executes, it is actually being executed by the proxy class. Obj=new Objectimp () before;(as an instance of the proxy class, which is the proxy class)

"Song Hongkang Learning Diary 18" interface

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.