Slashdot Mirror


User: edishere

edishere's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:Java 'generics' are not real generics on Java Generics and Collections · · Score: 1

    Ummm.... you are just using autoboxing here, not generics.
    You should try:
    List s = new ArrayList();

    then you CAN do:
    List l = s; .... but I don't know why you ever would, and if you decided to do that you could THEN do:

    l.add("wow");

    and you get errors. Sure, if you use goto's wrong you can get errors, if you use unsafe regions in C# incorrectly you can get errors, but then again, you are not using the language as intended.

    if you did:
    List s = new ArrayList(); ... and then:
    s.add("wow");

    you get what you would expect, a compilation error.