Huston, we have a problem !

"Zdeněk Troníček" tronicek at fit.cvut.cz
Fri Feb 18 10:41:22 PST 2011


Rémi Forax napsal(a):
> On 02/18/2011 07:08 PM, "Zdeněk Troníček" wrote:
>> As far as I understood the original question, it was as follows: Why we
>> need to write
>>
>> List<Integer>  p = new ArrayList<>();
>>
>> and not only
>>
>> List<Integer>  p = new ArrayList(); ?
>>
>> Is there any special reason for<>?
>>
>> Z.
>
> List<Integer>  p = new ArrayList(new ArrayList<String>());  // ok
>
> List<Integer>  p = new ArrayList<>(new ArrayList<String>());  // not ok
>

The problem is that the first line is apparently wrong. Do you feel as an
obligation to be backward compatible with code that is wrong?

Z.
-- 
Zdenek Tronicek
FIT CTU in Prague




More information about the coin-dev mailing list