how can we access individual int value from LinkedHashset<set<Integer>? Through string is it possible
<p>I want to remove duplicates e.g.{ {1,2,3}, {2,3,1},{3,2,1},{2,1,3} } are duplicates of {2,3,1} or any one from given 4 sets.for this i converted 2D Integer array into LinkedHashSet which removed duplicates but when i am converting back to array (due to need in algorithm) i am unable to access individual elements.is it possible? if not, what is the other way.if yes what is problem in the code.given below.please resolve.</p>

<p>my own other thinking: as i think through string is it possible? 
e.g { {2,3,1},{-3,-2,-4},...........  } insert in Set making ArrayList of each 3 element set e.g.{2,3,1},{-3,-2,-4},{3 element}, .....and then parseInt to access individual element as {2},{3},{1},{-3},{-2},{-4},... will it work?</p>

<pre><code>import java.util.*;
class demo
    {
    Integer[][] orderedpair3k={{1,2,3},{1,3,-2},{2,3,-1},{1,2,3},{1,-3,-2},{2,-3,-1},{1,-2,-3},{1,3,2},{-2,3,-1},{1,-2,3},{1,-3,2},{-2,-3,-1}};
    Set&lt;Set&lt;Integer&gt;&gt; r = new LinkedHashSet&lt;Set&lt;Integer&gt;&gt;();
    Object[][] a;

    public void init_clauses()
    {
    removeDuplicate();
    System.out.println(r);

    backToArray();          
      for(int i=0;i&lt;a.length;i++)
         System.out.println(a[0][i]);
    }                       

    public void removeDuplicate()
    {
    int i=orderedpair3k.length;
    for(int j=0;j&lt;i;j++)
        r.add(new LinkedHashSet&lt;Integer&gt;(Arrays.asList(orderedpair3k[j])));
    }    

    public void backToArray() 
    {    
      ArrayList&lt;Set&lt;Integer&gt;&gt; arr=new ArrayList&lt;Set&lt;Integer&gt;&gt;(r);
      a = new Object[arr.size()][3]; 

       for(int i=0;i&lt;a.length;i++)
         a[i]=arr.toArray(new Object[i]); 
    }       
}            
public class sat
{
     public static void main(String[] arg){

     demo S = new demo();
     S.init_clauses();}
}   
</code></pre>

<p>//in the above code i am unable to access individual element because in the array Set is inserted as Object even i tried using ((Integer)a[i][j]).intValue() i think this is due to Arrays.asList(orderedpair3k[j]) how this problem can be resolve?</p>
