• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generics

 
Chandraprabha Rajput
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain me the diffrence between
List<String> l = new ArrayList();

and
List<String> l = new ArrayList<String>();
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hardly an advanced question.

Go through the Java Tutorial about generics, especially the bit about raw types.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic