Results 1 to 3 of 3
  1. #1
    jeanjiang is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default How to make element unique in Java Collection

    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.
    Last edited by jeanjiang; 04-24-2011 at 02:08 PM.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Pune, India
    Rep Power


    Quote Originally Posted by jeanjiang View Post
    In Java, which code can implement this function.
    Have a look at the API : Set Interface

    Some more details : Set Operations

    You can use Google to find more code stuff.

    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Similar Threads

  1. java collection api
    By rajinder5 in forum Advanced Java
    Replies: 1
    Last Post: 10-07-2010, 01:51 PM
  2. Replies: 2
    Last Post: 09-06-2010, 01:03 AM
  3. Replies: 1
    Last Post: 02-08-2010, 02:33 PM
  4. Collection - java
    By Moonlightkid in forum Advanced Java
    Replies: 3
    Last Post: 09-02-2008, 05:04 AM
  5. Unique element in an array
    By revathi17 in forum New To Java
    Replies: 2
    Last Post: 12-31-2007, 09:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts