- Java 11 and 12:New Features
- Mala Gupta
- 54字
- 2021-07-02 12:27:01
Type inference in Java 8
Java, version 8, introduced functional programming, with lambda functions. The lambda expression can infer the type of its formal parameters. Consider the following code:
Consumer<String> consumer = (String s) -> System.out.println(s);
Instead of the preceding code, you could type the following code:
Consumer<String> consumer = s -> System.out.print(s);
推薦閱讀
- Vue.js 3.x快速入門
- 觸·心:DT時代的大數(shù)據(jù)精準營銷
- 精通JavaScript+jQuery:100%動態(tài)網(wǎng)頁設(shè)計密碼
- Redis入門指南(第3版)
- MySQL 8 DBA基礎(chǔ)教程
- 基于Swift語言的iOS App 商業(yè)實戰(zhàn)教程
- 概率成形編碼調(diào)制技術(shù)理論及應(yīng)用
- Python算法從菜鳥到達人
- 單片機應(yīng)用與調(diào)試項目教程(C語言版)
- Unity 2018 Shaders and Effects Cookbook
- Laravel Application Development Blueprints
- SpringBoot從零開始學(xué)(視頻教學(xué)版)
- OpenCV Android Programming By Example
- 零基礎(chǔ)學(xué)Java第2版
- Azure for Architects