Java???Lambda??????????????????
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Java???Lambda??????????????????相关的知识,希望对你有一定的参考价值。
?????????oid ?????? list express sys lam ring ?????? ??????
???????????????(parameters) -> expression ??? (parameters) ->{ statements; }
????????????String???????????????
static String[] atp = {"11", "22","33", "44", "55", "66"};
???Arrays???asList?????????????????????List??????
static List<String> players = Arrays.asList( atp );
//??????????????????for??????????????????
public static void main(String[] args) {
for (String player : players) {
System.out.print( player + "; " );
}
//?????? lambda ???????????????????????????(functional operation)
//players.forEach((player) -> System.out.print(player + "; "));
以上是关于Java???Lambda??????????????????的主要内容,如果未能解决你的问题,请参考以下文章
lambda 中的 Java 8 lambda 无法从外部 lambda 修改变量