• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generic in jdk 1.5  RSS feed

 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Generics in jdk1.5 is used basically for compile time safety in collection framework.

what all other benefits of Generics.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16058
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main reason that generics were included was indeed for the Collections framework. But ofcourse the extra type safety of generics can also be useful in other places. Here is some info from the JDK docs. Also note the link at the bottom of that page to a tutorial.

The definitive resource for Java generics is Angelika Langer's Java Generics FAQ. It describes every aspect of generics in detail (sometimes to a very advanced level).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!