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
Can java list be null?
Is java a prime method?
What are the differences between string, stringbuffer and stringbuilder?
What is the maximum size of byte array in java?
How do you ensure that n threads can access n resources without deadlock?
Say any two properties in beans?
What are the main concepts of oops in java?
What does arrays sort do in java?
What happens if a constructor is declared private?
What is the difference between class forname and new?
What is a void in java?
What is string literal in java?
What is bytecode verifier?
can rmi and corba based applications interact ?
What is a instance variable?