All properties in the interface are public static final, and the methods are public. The access modifier must be either the public interface or the other interface, similar to the inheritance of the class, the keyword extends
Http://www.cnblogs.com/dolphin0520/p/3811437.html
Deep understanding of Java interfaces and abstract classes
Http://baike.baidu.com/view/2493204.htm interface-Oriented programming
An interface refers to a method or function that is invoked by others, and is an abstraction of behavior.
Inheritance is a "yes" relationship, while an interface implementation is a "no" relationship.
(This is in the chapter when looking at the container to find all with collection puzzled)
Interface callbacks refer to the ability to assign a reference to an object created with a class that implements an interface to the interface sound
Interface variable, then the interface variable can invoke the method of the interface implemented by the class. In fact, when
When an interface variable calls a method in an interface that is implemented by a class, it is the method that notifies the corresponding object to invoke the interface
, this process is called an interface callback for the object function
Cross-class references
1) If a is a reference to Class A, then a can point to an instance of Class A. Or the one that points to class A
Sub-class, which is a case of upward transformation.
2) If a is a reference to interface A, then a must point to an instance of a class that implements interface A. This is
The case of an interface callback.
An abstract method is an abstract class. or direct abstract defines abstract class abstract method after; public abstract void Func (..); Subclasses are either abstract or override abstract methods
Anonymous classes: In multithreading, you must inherit an interface or implement a parent class anonymous object: Use the direct new O () as a parameter or use its method. Http://www.cnblogs.com/nerxious/archive/2013/01/25/2876489.htmlThread tt=new Thread (New Runnable () {public void run ( {System.out.println ("in THREAD");} });
Inner class http://www.cnblogs.com/nerxious/archive/2013/01/24/2875649.html
An anonymous inner class is a special local inner class that implements an interface through an anonymous class.
IA is defined as an interface.
IA i=new ia () {};
Java-Interface abstract class inner class anonymous class