Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

arrays.sort with comparator

Arrays.sort(twoDim, new Comparator<int[]>() {
    @Override
    public int compare(int[] o1, int[] o2) {
        return ((Integer) o2[0]).compareTo(o1[0]);
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #comparator
ADD COMMENT
Topic
Name
9+2 =