今天在项目中看到如下代码,很是惊奇:
var users = new ArrayList<User>();
这不是js声明变量的方式吗?怎么会出现在Java中?
原来是JDK10的新特性。。。
转载文章: https://www.jianshu.com/p/87a668f57c98