SE450: Anonymous Classes [18/41] |
Collections.sort(countries,
new CountryComparatorByName());
Comparator<Country> comp = new
Comparator<Country>()
{
public int compare(Country country1, Country country2)
{
return country1.getName().compareTo(country2.getName());
}
};