haocheng
積分 2
之前有相關 JEP:
不在語法層級支援的原因可能是這一段吧:
In the past, there have been a few proposals floated to change the Java programming language to support collection literals. However, as is often the case with language features, no feature is as simple or as clean as one might first imagine, and so collection literals will not be appearing in the next version of Java.