News for hackers. Stuff that matters.
Re:Java 7 - What's new? Release date, code examples and perf... by kentosi on Sunday April 11, 2010 @07:42PM (#1257947)
Good point. I see this as a good mechenism for allowing immutable lists (in which case it probably doesn't matter). But for mutable ones, you would probably want control over the datastructure.

The only way of allowing the programmer to do this, that I can think of for now, is by casting perhaps?

List<String> list = (LinkedList)["ham","eggs"];

Just an idea ...

Re:Java 7 - What's new? Release date, code examples and perf... by noss on Monday April 12, 2010 @06:12AM (#1258818)
List<String> list = new LinkedList<>(["ham","eggs"]);