J2EE - Java Collection Vs Common Collections

India
November 10, 2007 5:50am CST
Which collections classes better to use ?
1 response
• India
31 Dec 07
Hi hamith, Its really nice question. Java Collections comes with List,Set & Map implementations. With these collections , we can insert,modify,delete,sort the date. Upto here it is clear and fine. Common collections also the same but with vast variety of interfaces provided like "FIFO(queue) , LIFO(stack), priority queues etc" not only these it also provies BAG interface which indicates how many copies of each object is present,mapiterator interface etc., what i can conclude is that , depending upon our requirement we can go for common collections or java collections for suppose: i need FIFO (queue implementation ) then i will go for common collections where as just sorted set then i will o for java collections