Guest User

Untitled

a guest
Jan 22nd, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public static void listSortingDoubleForLoop(List<Integer> list){
  2.  
  3. for (int i = 0; i < list.size(); i++){
  4. for (int j = i+1; j < list.size(); j++){
  5. if (list.get(i).compareTo(list.get(j)) > 0){
  6. Collections.swap(list, i, j);
  7. }
  8. }
  9. }
  10. }
Add Comment
Please, Sign In to add comment