Collection is an interface whereas Collections is a utility class in Java.
List, Queue, Set are subinterfaces of collection interface. Map is also part of the collection framework.
The important methods used in collection interface are add(), remove(), size(), clear.
Collections class consists of only static methods like min(), max(), sort(), reverse(), synchronizedMap().
Collections.sort()
No comments:
Post a Comment