What is list interface?

Showing Answers 1 - 2 of 2 Answers

Madhavikari

  • May 10th, 2006
 

List is an interface which can be used for stroing the elements in inserting order. It allows to store the duplicate elements.

And for acceccing the elements, List provide a seperate iterator called ListIterator.

  Was this answer useful?  Yes

srinivas

  • May 17th, 2006
 

 

Hi,

An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list.

List is sub Interface of Collection Interface.

The List interface places additional stipulations, beyond those specified in the Collection interface, on the contracts of the iterator, add, remove, equals, and hashCode methods. Declarations for other inherited methods are also included here for convenience.

The List interface provides four methods for positional (indexed) access to list elements. Lists (like Java arrays) are zero based. Note that these operations may execute in time proportional to the index value for some implementations (the LinkedList class, for example). Thus, iterating over the elements in a list is typically preferable to indexing through it if the caller does not know the implementation.

ok baye...................

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

if any want java material & doubts regarding j2se ,j2ee plz send mail to

bora_srinivasarao@yahoo.co.in

  Was this answer useful?  Yes

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