Arrays.sort(card, new Comparator<int[]>() {
public int compare(int[] o1, int[] o2) {
if (o1[1] == o2[1])
return o1[0] - o2[0];
return o1[1] - o2[1];
}
});
Arrays.sort(card, (c1, c2) -> c1[1] - c2[1]);