private static class LastLetterComparator implements Comparator<String> {
public int compare(String o1, String o2) {
return o1.charAt(o1.length()-1) - o2.charAt(o2.length()-1);
}
}
<BUG>public static Comparator intArrayComparator(int index) {
</BUG>
return new IntArrayComparator(index);
}
private static class IntArrayComparator implements Comparator<int[]> {

private static class LastLetterComparator implements Comparator<String> {
public int compare(String o1, String o2) {
return o1.charAt(o1.length()-1) - o2.charAt(o2.length()-1);
}
}
public static Comparator<int[]> intArrayComparator(int index) {
return new IntArrayComparator(index);
}
private static class IntArrayComparator implements Comparator<int[]> {
