• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me to solve my problem

 
Mark Henryson
Ranch Hand
Posts: 200
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am learning Collections in Java. I want the example and explanationfor all the collections such as
Set - LinkedHashSet, HashSet (SortedSet - Treeset)
List - ArrayList, LinkedList and Vector
Map - HashMap, LinkedHashMap, HashTable (SortedMap - TreeMap)

Please provide me with some good tutorial for beginners to learn collections other than the Sun's tutorial.

ArrayList, Vector, LinkedList: I Know these concepts and have a general idea about what it is.

But I always struck with Hash table concepts. Also If you know any tutorial for beginners to easily understand the concepts of hash table will be helpful.
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Head First Java, by Bert Bates and Kathy Sierra
Thinking in Java (Free online), by Bruce Eckel
 
Hentay Duke
Ranch Hand
Posts: 198
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.google.com
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/docs/books/tutorial/collections/
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chapter 11: "Collections of Objects" from Bruce Eckel's Thinking in Java...

http://www.faqs.org/docs/think_java/TIJ313.htm
 
Rick O'Shay
Ranch Hand
Posts: 531
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To understand hash tables you must understand the purpose and nature of hash functions. It's all about reducing a string to a single numeric value. If you then use that value to identify a storage location, you can lookup an element without a search: compute the hash value, that's your location.

It's slightly more complicated than that. Duplicate values are frequently generated and hash functions are not limited to strings by any means. But, generally speaking that's all you need to know.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my analogy for lookups using hashCode...

Imagine a library with numerous rows of bookshelves. If you're looking for a particular book, it would be a lot faster if you knew what particular row of shelves to look in, rather than searching through the entire library. Of course, when you've found the correct shelves (indicated by hashCode), there might be other books on those shelves (because different objects might return the same hashCode), but you've narrowed your search to a much smaller region.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic