定义好委托: public delegate int FirDelegate(int a); public delegate int SecDelegate(int a,int b); public delegate string ThrDelegate(int a); lambda表达式其实是个匿名函数,第一个lambda表达式: FirDelegate fir = p => p + ;//实例化一个委托 fir();//调用,结果为110 第二个lambda表达式: SecDelegate…
函数式接口详细定义 package java.lang; import java.lang.annotation.*; /** * An informative annotation type used to indicate that an interface * type declaration is intended to be a <i>functional interface</i> as * defined by the Java Language Specificat…