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
Is vector synchronized in java?
What exactly is java?
Do you know how to reverse string in java?
Can I declare class as static or private?
Can interface be private in java?
Enlist few advantages of inheritance?
What about member inner classes?
What are the java ide's? Explain
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
What is a condition in java?
Which java ide is used the most?
How many characters is 2 bytes?
When do we use synchronized blocks and advantages of using synchronized blocks?
What do you mean by singleton class in java?
Which class is the superclass for every class in java programming?