• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HashSet and LinkedHashSet

 
sura watthana
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
could somebody please tell me what is a HashSet and LinkedHashSet for?
and are they included in the SCJP 1.4 exam?

Thanks

Sura
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the 1.4 exam, you need to be familiar with Collections (Sets and Lists) and Maps.

See Sun's 1.4 requirements:
http://suned.sun.com/US/catalog/courses/CX-310-035.html

See this Tutorial on Collections and Maps:
http://java.sun.com/docs/books/tutorial/collections/index.html

With respect to HashSet and LinkedHashSet, you basically need to understand that these are Sets (no duplicates); and the LinkedHashSet maintains element insertion order, while the HashSet maintains its own internal ordering. (A TreeSet maintains "natural ordering" of elements.)

See the following with respect to implementation:
http://java.sun.com/docs/books/tutorial/collections/implementations/general.html
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic