Java callback mechanism

A good link: http://www.cnblogs.com/heshuchao/p/5376298.html

 

**Essence: class A gives the right to use method C to class B 

            class B executes method C when appropriate

 

**The reason for using inner classes: security, will not expose all methods of A to B

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326221264&siteId=291194637