Wednesday, 4 May 2016

What are the similarities between HashSet and TreeSet ?


  • stores Unique elements
  • Not synchronized / Thread-safe (Must be explicit)
  • clone() makes shallow copies
  • Fail-Fast (If modified during iteration, throws ConcurrentModificationException)


No comments:

Post a Comment

Note: only a member of this blog may post a comment.