aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes difference betwen Collection and Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "difference betwen Collection and Collections" Watch "difference betwen Collection and Collections" New topic
Author

difference betwen Collection and Collections

michel razz
Greenhorn

Joined: Jul 30, 2009
Posts: 2
I'm confusing from last fewdays onwards
what is the main defference between Collection and Collections
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
A collection is the super interface of Maps and Sets.

Collections is a utility class that provides functionality such as sorting etc.


JDBCSupport - An easy to use, light-weight JDBC framework -
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

The best place would be to look at the documentation of both

java.util.Collections
java.util.Collection


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Balraj Momi
Ranch Hand

Joined: Jul 23, 2009
Posts: 45

A collection is the super interface of Maps and Sets.


Collection is not super type for Maps, It is only for Lists, Sets and family.

Regards Balraj


Regards
Balraj Kumar
SCJP 5 95%
SCWCD 82%
Preparing for SCBCD
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Sometimes you have to keep your eyes opened to spot the letter "s".


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Balraj Momi wrote:
A collection is the super interface of Maps and Sets.


Collection is not super type for Maps, It is only for Lists, Sets and family.

Regards Balraj

Exactly
So, for example you can not invoke add(...) method on a Map object. BE AWARE!
happy -nag
Greenhorn

Joined: Mar 09, 2008
Posts: 5
A Collection is an interface which can be used
for representing a group of objects as Single Entity
But
Collections is an Utility class defined several Utility methods
for Collection Objects..
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Adam -eve - give your full name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference betwen Collection and Collections