Back to articles
Collections in JAVA..

Collections in JAVA..

via Dev.to TutorialAnees Abdul

What is Collection in JAVA: -It is a pre-defined structure that provides ready-made tools and libraries, and classes to help developers build applications efficiently. Why do we need collections? -Before collections, Java mainly used arrays to store multiple values. However, arrays have some limitations: *Arrays have a fixed size *They can store only the same type of elements(Homogeneous) *Difficult to perform operations like insertion, deletion, and searching *Memory waste for unused positions Collections solve these problems by providing flexible and powerful data structures. Java Collection Framework Hierarchy: *The Collection interface is the root interface of the collections framework hierarchy. *Java does not provide direct implementations of the Collection interface, but provides implementations of its subinterfaces like List, Set, and Queue. The framework includes other interfaces as well: Map and Iterator. These interfaces may also have subinterfaces. Sub interfaces of collect

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles