Notes on implementing concise calls to constructors with type parameters

Neal Gafter neal at gafter.com
Wed May 13 11:00:52 PDT 2009


The first creates a raw ArrayList, and then invokes the unchecked conversion
(and generating the required warning from the compiler).

The second form is typesafe.

On Wed, May 13, 2009 at 10:58 AM, Ulf Zibis <Ulf.Zibis at gmx.de> wrote:

> BTW 1 question:
>
> Is there any difference in writing:
>    List<String> l = new ArrayList();
> or:
>    List<String> l = new ArrayList<String>();
>
> I guess not, so why using 2nd writing.
>
> thanks,
>
> Ulf
>
>
>
>



More information about the coin-dev mailing list