daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Comparator<Person> comp = new Comparator<Person>() {
  2.             // Opgave 1B:
  3.             // Comparatoren skal sorterer på heigth
  4.             @Override
  5.             public int compare(Person o1, Person o2) {
  6.                 double heigth1 = o1.heigth;
  7.                 double heigth2 = o2.heigth;
  8.                 if (heigth1 < heigth2) {
  9.                     return -1;
  10.                 } else if (heigth1 == heigth2) {
  11.                     return 0;
  12.                 } else {
  13.                     return 1;
  14.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top