Firstly, Why collections is part of java ? will discuss this and next will talk about actual question..
Collection are Collections both are part of java programming language. Collections will provid a way to store, manage, and manipulate groups of objects or data elements efficiently.
Some reasons why java is using collection (Abstraction,Standardization,Flexibility,Code Reusability,Enhanced Functionality)
Some reasons why java is using collections (Data Organization,Flexibility,Efficiency,Standardization,Safety and Type-safety,Concurrent Collections,API Consistency)
Now Actual question will discuss here :
Collection is interface and it will include iterable objects inside. In Java, a "collection" refers to an object that groups and stores multiple elements, allowing you to work with them as a single unit
public interface Collection<E>
extends Iterable<E>
Collections is a java utility class containing only static methods and it's used to manage and manipulate data efficiently in various data structures such as lists, sets, and maps. Java provides a rich framework known as the "Java Collections Framework" to work with collections.
public class Collections
extends Object
below picture is example for the collections interface..
Don't forget to check out my previous and upcoming posts for more insights.
For more interesting content, follow Uday Kumar Reddy Kadiri
Thank you for reading
check this blog : https://techblogsuday.blogspot.com/

Comments
Post a Comment