What is the difference between set and list?

Answer Posted / janet

set stores elements in an unordered way but does not
contain duplicate elements,where as ist stores elements in
an ordered way but may contain duplicate elements.

Is This Answer Correct ?    200 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What causes memory leak in java?

574


Is java free for commercial?

576


How you can force the garbage collection?

632


What is a substring of a string?

648


What is skeleton and stub?

677






How do you check whether the list is empty or not in java?

605


Difference between ‘is-a’ and ‘has-a’ relationship in java?

649


What is an immutable class?

713


What if I write static public void instead of public static void in java?

698


What is a java developer salary?

628


What is scope & storage allocation of global and extern variables? Explain with an example

673


What is difference between static class and singleton pattern?

561


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

692


What is the purpose of static methods and static variables?

640


What is javac used for?

606