Java Collection Framework #Java Short Notes

Array
Benefits Constraints
  • Data access is fast.
  • Good for ordered data, which is not changed or searched frequently.
  • Inefficient if number of elements grow.
  • Inefficient if an element to be inserted in middle of collection.
  • Provides no special search mechanism.
Linked List
Benefits Constraints
  • Allows efficient inserts/delete at any location
  • Allows arbitrary growth of collection.
  • Applying order to the elements is easy.
  • Slower while accessing elements by index.
  • No special search mechanism is provided.

Tree
Benefits Constraints
  • Easy addition/deletion in middle.
  • Allows arbitrary growth.
  • A better and efficient search mechanism.
  • Ordering is peculiar and some comparison mechanism is required.
  • Searching is not efficient for unevenly distributed data.

Hashtable
Benefits Constraints
  • Efficient searching.
  • Good access mechanism.
  • Allows arbitrary growth of collection.
  • Not good for small data set because of overheads.
  • Overhead for storing keys for the values in collection.
  • Overhead of hashing scheme.

From: http://sitestree.com/?p=4861
Categories:Java Short Notes
Tags:
Post Data:2007-06-09 22:01:31

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada