Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between 'collection' and 'Collection'

 
Nimmy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know the difference between collection and Collection.
I know Collection is an interface provided in the java.util park but I don't have any idea about 'collection'.

Please help
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing the context its a little hard to say, but I suspect "collection" is probably being used to define a data structure used to store objects without the writer wanting to make a specific reference to the Collection interface (which defines a particular type of collection). So an array could be considered a collection, but not a Collection. Understand?
 
Nimmy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou for the response.
I just wanted to know what is 'collection'.


Regards,
Mariya
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SECOND REQUEST

"Mariya"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
[ May 11, 2005: Message edited by: Mark Spritzler ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually in Java there isn't anything called "collection" with a lower case c.

you will find Collection which you already mentioned, but also Collections, which is a class of static methods to do things like sort, and binarySearch on a List.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic