title: equivalent data type of set in mysql to java
body: <p>Actually I want to store a type in java whose value can be combination of multiple single values with comma (,) separated. In mysql there is a type called set() used for similar functionality.</p>
  
  <p>For eg, say </p>
  
  <pre><code>3 A,B,C
  </code></pre>
  
  <p>result can be combination of these 3 with comma seperated</p>
  
  <p>In mysql with type set() type will be like</p>
  
  <pre><code>set('A','B','C')
  </code></pre>
  
  <p>and values for that field can be combination of these 3 with comma seperated for 2 or more values. ie 1 field value can be </p>
  
  <pre><code>A,B similarly B,C
  but A,D will throw SqlException
  </code></pre>
  
  <p>Im looking for such a functionality in java</p>