Skip to content

Instantly share code, notes, and snippets.

@chartsai
Created January 14, 2016 04:58
Show Gist options
  • Save chartsai/32c54048310365d29126 to your computer and use it in GitHub Desktop.
Save chartsai/32c54048310365d29126 to your computer and use it in GitHub Desktop.
public class MyComparator implement Comparator<String> {
@Override
public int compare(String left, String right) {
return left.length() - right.length();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment