This content has been marked as final. Show 2 replies
You are using:
which assumes the elements of the collection will implement Comparable.
You should instead use:
where stringArrayComparator implements Comparator<String>.
I suspect your use of string arrays is a BIG UGLY HACK.
If you replace the String with a well-written, comparable class, you'll be laughing.