Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using generics while creating objects

 
srujana maredugu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between creating object using Generics in java 1.5.

List<String> l=new ArrayList(); and
List l=new ArrayList<String>();
[ February 06, 2008: Message edited by: Jaikiran Pai ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srujana,

Welcome to JavaRanch

While posting a question please use a meaningful subject line. Doing so, you are more likely to get answers to your questions. I modified the subject line to be meaningful. I'll move this question to our JiG(B) forum where this is more appropriate.
[ February 06, 2008: Message edited by: Jaikiran Pai ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic