- 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);
推薦閱讀
- Learn ECMAScript(Second Edition)
- WildFly:New Features
- Learning C++ Functional Programming
- Rust編程從入門到實戰
- Java游戲服務器架構實戰
- ASP.NET 3.5程序設計與項目實踐
- Learning Data Mining with R
- 快速念咒:MySQL入門指南與進階實戰
- 移動界面(Web/App)Photoshop UI設計十全大補
- Mastering React
- Python青少年趣味編程
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Mastering jQuery Mobile
- Unity Android Game Development by Example Beginner's Guide
- HTML5移動前端開發基礎與實戰(微課版)