Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < arrayB.size(); i++) {
- if (!arrayB.get(i).getName().equals(arrayA.get(i).getName()) {
- Object temp = arrayB.get(i);
- for (int j = i + 1; j < arrayB.size(); j++) {
- if (arrayB.get(j).getName().equals(arrayA.get(i).getName())) {
- arrayB.set(i, arrayB.get(j));
- arrayB.set(j, temp);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment