![]() So we can concentrate more on business logic rather than designing our collection APIs. Reduced Development Effort – It comes with almost all common types of collections and useful methods to iterate and manipulate the data.Java Collections framework have following benefits: These classes are in package.Īll the collection classes are present in java.util and package. Some of them are CopyOnWriteArrayList, ConcurrentHashMap, CopyOnWriteArraySet. Java 1.5 came up with thread-safe collection classes that allowed us to modify Collections while iterating over them. These classes solve most of our programming needs but if we need some special collection class, we can extend them to create our custom collection class. Some important collection classes are ArrayList, LinkedList, HashMap, TreeMap, HashSet, and TreeSet. We can use them to create different types of collections in the Java program. Java Collections framework provides implementation classes for core collection interfaces. ![]() All the collections framework interfaces are present in java.util package. The Map is the only interface that doesn’t inherit from the Collection interface but it’s part of the Collections framework. ![]() Some other important interfaces are, , and.
0 Comments
Leave a Reply. |