What is Java Collections Framework List benefits of this framework

What is Java Collections Framework List benefits of this framework

The Java collections framework (JCF) is set of classes and interfaces that implement generally reusable collection data structures.

Although Java collection framework referred to as framework but it works in a manner of a library. JCF provides both interfaces that define various collections and classes that implement them.
Below is interface and class hierarchy of java.util.Map

java_collection_image

 

Below are benefit of collection framework:

  • Reduces programming effort by providing data structures and algorithms so that we do not have to write them our-self.
  • Increases performance by providing high-performance implementations of the data structures and algorithms. This is because various implementations of each interfaces are interchangeable, programs could be fine-tuned by switching implementations.
  • Provides interoperability between dissimilar APIs by forming a common language to pass collections back and forth.
  • Reduces effort required to learn APIs by requiring us to absorb multiple ad hoc collection APIs.
  • Reduces effort required to design and implement APIs by not requiring you to produce ad hoc collections APIs.
  • Adopts software reuse by providing standard interface for collections and algorithms with which to manipulate them.

 

Check out all interview questions

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *