Post navigation

What is List interface

What is List interface

Answer: public interface List extends Collection

List is ordered Collection (also called sequence). Lists can contain duplicate elements. Because it extends Collection all operations is inherited from it, List interface includes following below operations:

Search – it searches to specified object in the list and will returns its number position. Methods include lastIndexOf AND indexOf.

Positional access – this manipulates the elements based on its number position in list which includes methods as set, get, add, addAll, and remove.