J446·vor 14 Jahren·discussThat depends if you mean Java the language or Java the platform. Java the language is to include immutable collection literals in JDK8:http://jcp.org/en/jsr/detail?id=337Today Java lets you do the following:List<String> myList = Arrays.asList("one", "two", "three");Scala and Groovy which target the JVM let you do things like:Scala: val myList = List("one", "two", "three")Groovy: def myList = ["one", "two", "three"]Then there's JRuby, Jython etc.
J446·vor 14 Jahren·discussCollection literals for inclusion in JDK8:http://jcp.org/en/jsr/detail?id=337