Why we use set in java?



Why we use set in java?..

Answer / Kumar Saurabh

Sets in Java are used to store unique elements in a collection. Unlike List, Set does not allow duplicate elements and provides the operations like union, intersection, subtracting one set from another etc., which make it useful in various programming tasks.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is domain object

1 Answers  


What is a method vs function?

1 Answers  


what are the analysis of an object

2 Answers  


how to connect one jsp page to another jsp page????

6 Answers   IIT, Symphony,


What does || mean in code?

1 Answers  


What is a class instance variable?

1 Answers   Tech Mahindra,


How many bytes is string in java?

1 Answers  


In what type of containers, Border layout is a default layout?

3 Answers  


Can we define package statement after import statement in java?

1 Answers  


What is difference between adapter class and listener?

1 Answers  


Can each java object keep track of all the threads that want to exclusively access it?

1 Answers  


Will minecraft java be discontinued?

1 Answers  


Categories