What is Collection and how it supports java?

Showing Answers 1 - 4 of 4 Answers

hariprasad

  • Oct 30th, 2006
 

collection is a group of objects.its an basic interface to all interfaces.under collection set and list are sub interfaces.These 2 interfaces extends collection interface.

By using collections we can read the elements from the database.

if you want to read only once gofor Iterator and create instance and to make use.

if you want to read more than once gofor ListIterator then use methods like

1.add

2.hasNext

3.next

4.hasPrevious

5.previous

where as in Iterator we cant add elements once instance getting over.

only possible remove operations.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions