4

JDK17 都出来了,感觉现在很多资深程序员 Stream 不会, Lambda 不会, Java .time 包...

 2 years ago
source link: https://www.v2ex.com/t/865425
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Java

JDK17 都出来了,感觉现在很多资深程序员 Stream 不会, Lambda 不会, Java .time 包不会

  qwerthhusn · 3 小时 22 分钟前 · 2092 次点击

不少资深人士写代码的时候还是各种 for 循环。

Lambda 也不用,还用各种匿名内部类。

还有 JDK8 的时期时间库,很多人还是在用 Date ,Calender 。现在的 LocalDate, LocalDateTime, YearMonth, ZonedDateTime 做时间计算真的特别直观简单,但是他们就喜欢用 Date ,简单的计算就用毫秒加减,复杂点的计算就先换成 Calender ,完事后再转换回 Date 。

甚至 JDK7 的 try-with-resources 语法我都感觉不少人都不知道。

所以,现在“JDK8 是主流”这句话是不对的,而是“JVM8 是主流”才是对的。语法的主流应该是 J2SE 1.5 。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK