File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Collection Framework,making my mind a bit unstable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Collection Framework,making my mind a bit unstable" Watch "Collection Framework,making my mind a bit unstable" New topic
Author

Collection Framework,making my mind a bit unstable

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

Finding difficulty in able to understand Collection framework...can anybody provide me a link which explains Collection right from the start


http://www.lifesbizzare.blogspot.com || OCJP:81%
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

http://download.oracle.com/javase/tutorial/collections/index.html


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

I mean i know Collection is used for adding, removing object

List ,Set , Tree etc are the interfaces

list can have duplicates, set cannot..

I find difficult in remembering pre defined methods ...also i am not getting a clearcut idea what TreeSet (ofcourse its again a set having unique values ,but whats with the term tree??)
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43350
    
  32
Vishal Hegde wrote: . . . I find difficult in remembering pre defined methods
That is what the API documentation is there for.
...also i am not getting a clearcut idea what TreeSet . . .
You will have to find an algorithms and data structures tutorial or book. You can see what a tree looks like, and draw an example on paper. Try looking for Niklaus Wirth Data Structures and algorithms book.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3892
    
  18

If you want to remember the methods, you simply have to use the classes a lot. Practice makes perfect.

A tree is a data structure. They are a compromise between arrays (which provide random access) and linked lists (which provide easy insertion and deletion).

A set may use different ways of storing its data. A TreeSet will use a tree to store data, a HashSet will use a hash table to store data, and a LinkedHashSet will use a combination of a linked list and a hash table.

Different ways of storing data have different advantages and disadvantages.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
Consider Paul's rocket mass heater.
 
subject: Collection Framework,making my mind a bit unstable
 
It's not a secret anymore!