Java Collection can store many elements. Some Collection like Set must guarantee element unique. So, I want to know how to make it? In Java, which code can implement this function.
Printable View
Java Collection can store many elements. Some Collection like Set must guarantee element unique. So, I want to know how to make it? In Java, which code can implement this function.
You would do this by using a Set of some type as you've mentioned.
Have a look at the API : Set Interface
Some more details : Set Operations
You can use Google to find more code stuff.
Goldest