O'Reilly logo
  • MESUT ARSLAN thinks this is interesting:

If angle brackets are entirely omitted, as in the following example,

bid = new Pair("ORCL", 32.07);             // classic style

this reverts to the classic style, with Object automatically used for all generic type parameters, and resulting in a compiler warning when assigning to a variable with more specific types.


Cover of Data Structures and Algorithms in Java, 6th Edition


Generics -03