Learn Selenium and Java for Selenium

Saturday, 14 July 2018

What are collections in JAVA?

What are Collections in JAVA?


Today we will be learning of Collections , Collections in java are used to store different object in a single unit.It is like a jar of chocolates


Now let us understand why we need Collections?


As java Collections framework provide useful set of classes and its methods which are very powerful. If we need to perform algorithm operation we can perform that, if we want to perform add,remove operation that are also easily achievable .

Collections framework helps to decrease the development effort and increase the quality of code

A Collections framework consist of

  •                    Interface and its implementation(classes)
  •                          Algorithms


Use of Collections

The use of Collections is not all about its powerful nature it is also about about the flexibility it adds , consider if we use array we define its fixed size but after using the arraylist in Collections the size is dynamic which helps not to waste any memory.Now Collections can also store both homogeneous and heterogeneous objects which is an additional advantage ,so benefits are many


In next article we would understand the Collections architecture, Keep reading!!


0 comments:

Post a Comment

Popular Posts

Recent Posts



Newsletter

Join our newsletter to get secret tips directly in your inbox!


*We Hate Spam!

Powered by Blogger.