what is difference between set and list in collection?

Answer Posted / srinu

set:
1)set interface extended from collection interface
2)set does not allow duplicated values
3)set interface contain concreated classes(TreeSet,HashSet)
4)set interface retrive the data only forward Direction
only( only Iterator is their)
5)in set object add an element at end only
6)set interface contain one sub interface(sorted set)

List
1)List interface extended from collection interface.
2)List allows duplicated values
3)List interface contain concreated
classes(ArrayList,LinkedList)
4)in List object add an element at specific(dynamic)
insertion is possible
5)List interface retrive the data forward Direction and
backword directions(ListIterator is their)
6)List interface does not contain ony sub interface

Is This Answer Correct ?    36 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is not object oriented programming?

513


Difference between method overloading and overriding.

584


What is meant by oops concept in java?

508


What is static import in java?

536


What are the special characters?

540






How do you declare an empty string?

624


What is sorting algorithm in java?

527


What is the file extension for java?

617


What are loops in java?

555


What is super?

589


What is primitive array?

526


Why is java so important?

655


What is port number in java?

599


What is the functionality of the stub?

575


Can we nested try statements in java?

632