JAVA 8 之lambda表达式

summary:

   A lambda expression can be understand as a kind of anonymous function: it does'nt have a name, but it has a list of paramters, a body, a return type, and also possibly a list of exceptions that can be thrown.

  Lambda expressions let you pass code concisely.

 A functional interface is interface that declares exactly one abstract method.

Lambda expressions can by used only where a functional interface is expected.

Lambda expressions let you  provide the implementioon of the abstract method of a functional interface directly inline and treat the whole expression as an instance of a functional interface.

 

There are primitive specializations of common generic functional interfaces such as Predicate and Function that can be used to avoid boxing operations: IntPredicate, IntToLongFunction, and so on.

你可能感兴趣的:(javaEE/java,java)