What is the main difference between Collection and Collections in Java?
-
24a little javadoc now and then hasn't hurt anyone.. – Bozho Nov 25 '09 at 11:34
18 Answers
Collection
is a base interface for most collection classes, whereas Collections
is a utility class. I recommend you read the documentation.

- 518
- 8
- 28

- 7,883
- 1
- 32
- 23
-
19Which would be: http://java.sun.com/javase/6/docs/api/java/util/Collections.html http://java.sun.com/javase/6/docs/api/java/util/Collection.html – omerkudat Nov 25 '09 at 11:43
-
1Or, for Java 8: https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html – Ollie Jun 08 '18 at 03:00
Are you asking about the Collections class versus the classes which implement the Collection interface?
If so, the Collections class is a utility class having static methods for doing operations on objects of classes which implement the Collection interface. For example, Collections has methods for finding the max element in a Collection.
The Collection interface defines methods common to structures which hold other objects. List and Set are subinterfaces of Collection, and ArrayList and HashSet are examples of concrete collections.

- 25,298
- 8
- 64
- 82
collection : A collection(with small 'c') represents a group of objects/elements.
Collection
: The root interface of Java Collections Framework.
Collections
: A utility class that is a member of the Java Collections Framework.
-
4
-
First line in the Collection documentation: "The root interface in the collection hierarchy" – dahui Nov 07 '16 at 13:09
Collection
, as its javadoc says is "The root interface in the collection hierarchy." This means that every single class implementing Collection
in any form is part of the Java Collections Framework.
The Collections Framework is Java's native implementation of data structure classes (with implementation specific properties) which represent a group of objects which are somehow related to each other and thus can be called a collection.
Collections
is merely an utility method class for doing certain operations, for example adding thread safety to your ArrayList instance by doing this:
List<MyObj> list = Collections.synchronizedList(new Arraylist<MyObj>());
The main difference in my opinion is that Collection
is base interface which you may use in your code as a type for object (although I wouldn't directly recommend that) while Collections
just provides useful operations for handling the collections.

- 29,022
- 11
- 55
- 82
-
Of course, now `Iterable` is the root interface of the collection hierarchy. – Tom Hawtin - tackline Nov 25 '09 at 12:12
-
2I'd say that Iterable is the root interface of the iterable hierarchy. :) – Kevin Bourrillion Nov 25 '09 at 16:12
-
1
Collection
is an interface containing List
, Set
and Queue
.
Collections
is a class containing useful methods like Collections.sort()
and Collections.synchronizedlist()
, etc.

- 16,831
- 17
- 68
- 94

- 121
- 1
- 2
Collection is an root interface of Java collection framework. Collections is a utility class which contains static methods. example Collections.sort()

- 31
- 1
- 1
- 7
Collection is an Interface which can used to Represent a Group of Individual object as a single Entity.
Collections is an utility class to Define several Utility Methods for Collection object.

- 21
- 1
Collection is a interface which is used to represent group of individual object as a single entity.
Collections is an utility class present in java.util. package to define several utility method (like sorting,searching ) for collection object.

- 31
- 3
Collection, as its javadoc says is "The root interface in the collection hierarchy." This means that every single class implementing Collection in any form is part of the Java Collections Framework.
The Collections Framework is Java's native implementation of data structure classes (with implementation specific properties) which represent a group of objects which are somehow related to each other and thus can be called a collection.
Collections is merely an utility method class for doing certain operations, for example adding thread safety to your ArrayList instance by doing this:
List list = Collections.synchronizedList(new Arraylist());
The main difference in my opinion is that Collection is base interface which you may use in your code as a type for object (although I wouldn't directly recommend that) while Collections just provides useful operations for handling the collections.

- 51
- 1
Collection is a base interface for most collection classes (it is the root interface of java collection framework) Collections is a utility class
Collections class is a utility class having static methods It implements Polymorphic algorithms which operate on collections.
Collection is an interface from which other class forms like List, Set are derived. Collections (with "S") is a utility class having static methods to simplify work on collection. Ex : Collections.sort()

- 27
- 3
As per Java Doc Collection is:
The root interface in the collection hierarchy. A collection represents a group of objects, known as its elements. Some collections allow duplicate elements and others do not. Some are ordered and others unordered. The JDK does not provide any direct implementations of this interface: it provides implementations of more specific subinterfaces like Set and List. This interface is typically used to pass collections around and manipulate them where maximum generality is desired.
Where as Collections is:
This class consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, "wrappers", which return a new collection backed by a specified collection, and a few other odds and ends.

- 1,439
- 1
- 15
- 30
Collections is a class which has some static methods and that method returns the collection. Collection is an interface,rather than root interface in collection hierarchy.

- 11
- 2
-
1Hi titas. The same answer was answered by @Luno and accepted three years ago. No need to repeat it. – MByD Sep 22 '12 at 01:41
Yes, Collections is a utilty class providing many static methods for operations like sorting... whereas Collection in a top level interface.

- 483
- 5
- 9
Collections is a utility class, meaning that it defines a set of methods that perform common, often re-used functions, such as sorting a list, rotating a list, finding the minimum value etc. And these common methods are defined under static scope.
Collection is an interface that is implemented by AbstractCollection which in turn is implemented by AbstractList, AbstractSet etc.
Also, Collections class has thirty-two convenience implementations of its collection interfaces, providing unmodifiable collections, synchronized collections. Nearly all of these implementations are exported via static factory methods in one noninstantiable class (java.util.Collections).
Reference: Effective Java

- 960
- 12
- 15
collection is an interface and it is a root interface for all classes and interfaces like set,list and map.........and all the interfaces can implement collection interface.
Collections is a class that can also implements collection interface.......

- 1
-
downvote for `Collections is a class that can also implements collection interface....... ` Mind that `Collections` is a utility class – Suganthan Madhavan Pillai Aug 23 '15 at 15:49