static int [] hashset_to_int_array(HashSet<Integer> hs){ int array[] = new array[hs.size()]; Iterator itr = hs.iterator(); int i=0; while(itr.hasNext()){ array[i++] = Integer.parseInt(itr.next().toString()); } return array; }
No comments:
Post a Comment