Collection Interface
Interface Collection<E>
caution
The differences between the Collection
and Collections
are:~
- The
Collection
is an INTERFACE whereasCollections
is a CLASS. - The
Collection
interface provides the standard functionality of data structure toList
,Set
, andQueue
. However,Collections class
is tosort
andsynchronize the collection elements
. - The
Collection
interface provides themethods
that can be used for data structure whereasCollections class
provides thestatic methods
which can be used for various operation on a collection.
tip
REFERENCE:~
- Official Documentation:-
Java 14
java.util.Collections
https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/util/Collection.html - ....