• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Collection Framework,making my mind a bit unstable

 
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finding difficulty in able to understand Collection framework...can anybody provide me a link which explains Collection right from the start
 
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://download.oracle.com/javase/tutorial/collections/index.html
 
Vishal Hegde
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??)
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Saloon Keeper
Posts: 15510
363
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic