What is the Difference between Collection and Collections ?

Ans :- the main difference between Collection and Collections :-

1.Collection<E>

2.Collections

1.Collection<E> 

=> Collection <E> is an interface from java.util package and which is the root of Java Collection<E> Framework.

2.Collections :

=> “Collections” is a Class from java.util package and provides a sort() method to perform the sorting process on List<E> Object.

******************************************************

Leave a Reply

Your email address will not be published. Required fields are marked *

*