Which class has no duplicate elements?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
The java.util.Set interface and related implementations dont
support duplicate elements.
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / ramanareddy333
in java .util package there is one interface (set interface)
that interface does not allows the duplicate values.that
interface implementations class are
hashset,treeset....these classes don't allow the duplicate
values.
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / shweta
set wont allow duplicate element all the classes implementin
set interface wont allow for eg HashSet TreeSet
Hash map will allow for two different key u can have same value
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / neeti
the set inteface does'nt allow duplicate
elements.therefore,the add() method return false if an
attempt is made to add duplicate elements to a set.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / venkatesh
Which one will not allow duplicates, is it HashMap or
HashTable? Please explain the corect answer with an
example. Thanks in advance
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / rajesh
hashset,treeset....these classes don't allow the duplicate
values.
| Is This Answer Correct ? | 2 Yes | 2 No |
What does jre stand for?
If we don’t want some of the fields not to serialize how to do that?
How is it possible for two string objects with identical values not to be equal under the == operator?
What is light weight component?
Can we use string in switch case in java?
Why is Java a platform independent language?
How does arraylist work in java?
java is puerly object oriented or not ?
Difference between a Scrollbar and a ScrollPane?
Hi can u pls tell me what is the use of marker interface. Iknow what is marker interface but what ability will the object get by implementing this.
What does the exclamation mark mean in java?
Can we have 2 main methods in java class?