Collections vs Collection

Collection is the root interface in collection hierarchy,groups multiple elements into a single unit, it allows duplicate & non-duplicate elements  which may be ordered or unordered.
Collections is a class which extends Object class & it consists exclusively static methods .It is a member of Java Collections Framework.Collections are used to store,retrieve, manipulate, and communicate aggregate data

Collection is the interface. which can be implemented List,set,Queue.This interface contain only instance methods.
Collections is the class .This class contain utility methods such as all algorithm oriented methods.This class contain only static methods.

0 comments:

Post a Comment