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
when should you use stringbuilder class in a program?
What is == and === in javascript?
In how many ways we can create threads in java?
What is the difference between serializable and externalizable interface?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
What is a parent class in java?
Can we use both this () and super () in a constructor?
How do you implement singleton class?
What do you mean by ordered and sorted in collections in java?
What is ‘has a’’ relationship in java?
Why we used break and continue statement in java?
Explain the selection sort algorithm?
Is null a string?
How does linkedhashmap work in java?
What are the object and class classes used for?