File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes collection and generics 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 "collection and generics" Watch "collection and generics" New topic
Author

collection and generics

himanshu kesarwani
Ranch Hand

Joined: Aug 27, 2008
Posts: 84
please tell me how can i understand collection and generics well.......i am not getting that from the k and b...
every thing in KB is great else generics and collection.....its not that easy to understand as other chapters are.....
I AM HAVING KHALID MUGAL ALSO.........suggest me is KB sufficient or i should go with khalid also......!!


SCJP 5
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

Well Himanshu I don't know about the new Khalid Mughal book but the one that I had didn't had generics in it. For generics I would recommend generics tutorial from sun. As far as collection goes, I feel that the K&B book is sufficient for collections. You just need to practice to be more familiar with collections. The khalid mughal book is too technical in it's language on the collections chapter...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Stephen Davies
Ranch Hand

Joined: Jul 23, 2008
Posts: 352
If you have access to Sierra & Bates HeadFirst Java Book, its a little clearer. Generics in my opinion is about Type Safety, i.e letting the JVM know what Object types are expected in a collection for example, with the compiler complaining if the wrong type is added to the collection.

For example



Hope this throws some light on the matter!


be a well encapsulated person, don't expose your privates, unless you public void getWife()!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: collection and generics