Guest User

Untitled

a guest
Oct 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. for (int i = 0; i < arrayB.size(); i++) {
  2. if (!arrayB.get(i).getName().equals(arrayA.get(i).getName()) {
  3. Object temp = arrayB.get(i);
  4.  
  5. for (int j = i + 1; j < arrayB.size(); j++) {
  6. if (arrayB.get(j).getName().equals(arrayA.get(i).getName())) {
  7. arrayB.set(i, arrayB.get(j));
  8. arrayB.set(j, temp);
  9. }
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment