It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Generics and collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generics and collections" Watch "Generics and collections" New topic

Generics and collections

Mabetha Chokwe

Joined: Aug 13, 2009
Posts: 1
can any 1 give me the basic concept of Generics and collections
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
That topic goes far too deep to put it in a nutshell. But let me try ...

Collections are classes that hold an array of objects for you. They enhance the behavior of traditional Arrays in adding functionality and convenience.

Prior to Java 5, Collections could not be typed. You could stuff any object into a collection, and upon retrieval, you needed to cast it back to the initial object type.
This is error-prone and also cumbersome.
Generics allow you to parameterize your collection and hence make it type safe.


JDBCSupport - An easy to use, light-weight JDBC framework -
Ankit Garg

Joined: Aug 03, 2008
Posts: 9465

Howdy Mabetha, welcome to javaranch

It is tough to cover those two massive topics that easily. Here are a few resources that can be useful (these are just tutorials I found on google)

You can also buy this book on this topic...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Yewint Ko
Ranch Hand

Joined: Aug 02, 2009
Posts: 90
Hi Mabetha!
You'd better find out some books. There are too much concept you need for Generics and Collection framework .Visit to find some books.
I agree. Here's the link:
subject: Generics and collections
It's not a secret anymore!