0 Replies Latest reply: Mar 14, 2013 1:19 PM by 996004 RSS

    How to get unique values

    996004
      for (int i = 0; i < newRows.length; i++) {
      for (int a = 0; a < initRows.length; a++) {
      if (newRows.equals(initRows[a])) {
      noDuplicate.add(newRows[i]);
      }
      }
      }
      Iterator iterator = noDuplicate.iterator();

      while (iterator.hasNext()) {
      Object val = iterator.next();
      System.out.println(val);
      }
      When i compile and run this program i got duplicate values of my 2 arrays. But I want to get Unique values of that two arrays. How can i do it??

      Thank You!