Total Pageviews

Tuesday, 26 January 2016

What are the benefits of the Java collection framework?

Collection framework provides flexibility, performance, and robustness.
  • ô€‚ƒPolymorphic algorithms – sorting, shuffling, reversing, binary search etc.
  • Set algebra - such as finding subsets, intersections, and unions between objects.
  • Performance - collections have much better performance compared to the older Vector and Hashtable classes with the elimination of synchronization overheads.
  • Thread-safety - when synchronization is required, wrapper implementations are provided for temporarily synchronizing existing collection objects.
  • Immutability - when immutability is required wrapper implementations are provided for making a collection immutable.
  • Extensibility - interfaces and abstract classes provide an excellent starting point for adding functionality and features to create specialized object collections.

No comments: