+ 1

How to make set to allow duplicates in java

Does it allow? Can anyone explain with a program?

6th Feb 2020, 2:16 PM
Shivaharshitha
Shivaharshitha - avatar
7 Answers
+ 8
nope never duplis = set.toArray()
6th Feb 2020, 2:18 PM
Oma Falk
Oma Falk - avatar
+ 4
The only feature sets have is that they do not allow duplicates. Why do you want to take that away from them.
6th Feb 2020, 2:20 PM
Avinesh
Avinesh - avatar
+ 4
This is not necessary :) Use a List instead.
6th Feb 2020, 5:42 PM
Tashi N
Tashi N - avatar
+ 3
Don't be a mermaid and comb your hair with a fork - use tools for what they're meant for. ;-)
6th Feb 2020, 2:25 PM
HonFu
HonFu - avatar
+ 3
XXX, I've watched my share of disney movies. ;)
6th Feb 2020, 2:42 PM
HonFu
HonFu - avatar
+ 2
[THIS IS NOT AN ANSWER] HonFu how is your imagination so good?😜
6th Feb 2020, 2:39 PM
XXX
XXX - avatar
- 1
Hallo
8th Feb 2020, 2:01 PM
Rizal Channel