There's got to be a quicker way to do these comparisons. for (int x = 0; x < subjects.size(); x++) { for (int y = 0; y < subjects.size(); y++) { System.out.println(contents.size()-x + " more to go"); try { if (subjects.get(x).equals(subjects.get(y))) { if (contents.get(x).equals(contents.get(y))) { if (x != y) { System.out.println("Match found - " + subjects.get(x) + " Contents - " + contents.get(x)); matches ++; } } } } catch(NullPointerException ex) { } } } System.out.println("Total matched - " + matches);
Forum Rules
Bookmarks