Skip to content

Instantly share code, notes, and snippets.

@ahmed-bacha
Created January 13, 2015 12:46
Show Gist options
  • Save ahmed-bacha/88df50d21e351f8d0740 to your computer and use it in GitHub Desktop.
Save ahmed-bacha/88df50d21e351f8d0740 to your computer and use it in GitHub Desktop.
// on ordonne la liste en spécifiant une fonction pour le Comparator
Collections.sort(currencies, new Comparator<Currency>(){
public int compare(Currency c1, Currency c2){
return c1.getName().compareTo(c2.getName());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment