Created
June 6, 2017 19:51
-
-
Save MericBERBER/7044c989475dfb975a27339dbd417377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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