Skip to content

Instantly share code, notes, and snippets.

@MericBERBER
Created June 6, 2017 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MericBERBER/7044c989475dfb975a27339dbd417377 to your computer and use it in GitHub Desktop.
Save MericBERBER/7044c989475dfb975a27339dbd417377 to your computer and use it in GitHub Desktop.
import java.util.Comparator;
public class PersonComparator implements Comparator<Person> {
@Override
public int compare(Person o1, Person o2) {
return o1.yas > o2.yas ? 1 : -1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment