Lambda 表達式
Lambda Expressions in Java 8
一、what's Lambda
Lambda?expressions?basically?express?instances?of?functional?interfaces?(An?interface?with?single?abstract?method?is?called?functional?interface.?An?example?is?java.lang.Runnable).?lambda?expressions?implement?the?only?abstract?function?and?therefore?implement?functional?interfaces lambda?expressions?are?added?in?Java?8?and?provide?below?functionalities.
Enable?to?treat?functionality?as?a?method?argument,?or?code?as?data.
A?function?that?can?be?created?without?belonging?to?any?class.
A?lambda?expression?can?be?passed?around?as?if?it?was?an?object?and?executed?on?demand
Lambda?表達式基本上表示函數(shù)接口的實例(具有單個抽象方法的接口稱為函數(shù)接口。一個例子是java.lang.Runnable)。lambda?表達式實現(xiàn)唯一的抽象函數(shù),因此實現(xiàn)函數(shù)接口
lambda?表達式在?Java?8?中添加,并提供以下功能。
啟用此選項可將功能視為方法參數(shù),或?qū)⒋a視為數(shù)據(jù)。
可以在不屬于任何類的情況下創(chuàng)建的函數(shù)。
lambda?表達式可以像對象一樣傳遞并按需執(zhí)行
二、實踐

三、
