Simply supply a lambda: Arrays.sort(words, (first, second) -> Integer.compare(first.length(), second.length())); Behind the scenes, the Arrays.sort method ...
確定! 回上一頁