Giter VIP home page Giter VIP logo

niumoo / jdk-feature Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 8.0 76 KB

☕【Java 新特性系列】Java 版本任你发,我用 Java 8 。但是多学点这种奇巧的装 X 技巧总没错,何况有些新语法说不定是真香呢。

Home Page: https://www.wdbyte.com/categories/Java-%E6%96%B0%E7%89%B9%E6%80%A7/

Java 100.00%
java java8 java9 java8-tutorial java8-lambda-expression java8-stream java10 java11

jdk-feature's Introduction

Java 新特性

Java 新特性系列,随着新版 Java 的发布不断更新。如果觉得不错,欢迎⭐Star️,欢迎 Fork !

每个 Java 版本的新特性都有对应的文章详细介绍,想了解的可以访问我的 Java 新特性系列文章。

Java 新特性系列文章

Java 10

JEP 322 - 基于时间的版本号

JEP 286 - 局部类型推断

JEP 317 - 基于 Java 的 JIT 编译器(实验性)

JEP 310 - 类数据共享

JEP 307 - G1 并行全GC

JEP 314 - Unicode 语言标签扩展

Java 9

模块化

集合工厂方法

Stream API

接口私有方法

HTTP/2 Client

Java REPL - JShell

Java 8

函数式编程

Lambda 表达式

新的时间函数 LodalDateTime

防止空指针的 Optional

接口默认方法

Java 7

资源自动关闭 Autoclosable

变长参数 String... args

多进制赋值法

下划线数字

switch 和字符串

多异常捕获

交流


🐟 欢迎关注公众号:未读代码(weidudaima),一起成长,欢迎⭐Star️,欢迎 Fork !

导入 IDEA

导入 IDEA 后请在项目结构立为每个模块设置对应的 JDK 版本,不然你可能会遇到超越当前 JDK 版本语法的报错。

jdk-feature's People

Contributors

anglezxy avatar niumoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jdk-feature's Issues

stream

@test
public void simpleTest(){
List numbers = Arrays.asList(1, 2, 3);
int[] factor = new int[] { 2 };
Stream stream = numbers.stream()
.map(e -> e * factor[0]);
factor[0] = 0;
stream.forEach(System.out::println);
}
作者大大,请问这个为什么改了factor[0]的数值,遍历出来的流数值就会改变呢? 明明map映射的时候,采用的是factor[0]=2的数值啊。无法理解,能解释一下吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.