class="java">List list = Arrays.asList(ids); Set set = new HashSet(list); String [] rid=(String [])set.toArray(new String[0]);