What is the Difference between Collection and Collections ?

 Interview Question

What is the Difference between Collection and Collections ?

Ans :-

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.

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

Comments

Popular posts from this blog

What are POJO classes in spring? What is the use of POJO Class, and How to create POJO classes.

How to create React project using command prompt?