次の方法で Arrays.sort() メソッドを使用してオブジェクトの配列をソートする方法を知っています。
Arrays.sort(array of primitive type);
Arrays.sort(array of primitive type, from, to);
Arrays.sort(array of an object type);
Arrays.sort(array of an object type , from, to);
しかし、次の2つの方法についてはわかりません。
Arrays.sort(array of an object type , comparator);
Arrays.sort(array of an object type , from, to, comparator);
これらのメソッドを使用して型オブジェクトの配列をソートする方法を誰か教えてください.java クラスへのコードまたはリンクを追加してください.検索しようとしましたが、見つかりませんでした.
ありがとう。