array and diamond (original) (raw)
David Holmes david.holmes at oracle.com
Sun Dec 11 11:16:55 UTC 2011
- Previous message: array and diamond
- Next message: array and diamond
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/12/2011 8:56 AM, Rémi Forax wrote:
Is there a reason why the diamond syntax can't be used with an array ?
List<?>[] list = new List<>[12];
It can in Java 7. That's the bug that we just discussed in regard to the java.util.concurrent code cleanup where I suggested to use:
HashEntry<K,V>[] newTable = new HashEntry<>[1];
to avoid the explicit cast. ;-)
David
Rémi
- Previous message: array and diamond
- Next message: array and diamond
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]