Phase 1 Language Basics + Advanced _1-3-Java language senior _08-JDK8 new features _ Section 1 common function interface _2_ use functional interface


Define the test class. Definition method, parameters are defined by the interface.

Interface class way

Calling a method, the parameter is an interface, this interface can pass implementation class object

Anonymous inner class way

Lambda





A first implementation class manner, because there is no method of rewriting the output

lambda simplified




 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11279323.html