Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with Generics

 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New around here. Any place I can go to make since of difficult generics?

I understand stuff like: List<Car> carList = new ArrayList<Car>();

But stuff like this makes my head explode:



Ouch!! I don't think an explanation of the previous code would even help, the entire concept is confusing to me! Thank you!
 
victor kamat
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are serious about understanding Generics get this book:

Java Generics and Collections by Maurice Naftalin and Philip Wadler

By the way Generics are really quite simple. This book will help you.
 
Ashish Hareet
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian,

Try the following from Sun - http://java.sun.com/docs/books/tutorial/java/generics/index.html & here's another one from Sun again - http://java.sun.com/docs/books/tutorial/extra/generics/index.html

HTH
Ashish Hareet
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Victor, I don't really have the $$ or time for another book right now. I may check that out later though, thanks.

Ashish, Thank you, I'll read up on those!
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks again Ashish, just finished reading both articles. If anyone else is having the same difficulties the second one is much better IMO. It's a bit longer, but much more detailed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic