[Java] The method sort(int[]) in the type Arrays is not applicable for the arguments (int[], Collections.reverseOrder())


[Java] The method sort(int[]) in the type Arrays is not applicable for the arguments (int[], Collections.reverseOrder())

int[] 배열에 대하여 내림차순 정렬을 하려고 시도하면 나오는 에러이다. The method sort(int[]) in the type Arrays is not applicable for the arguments (int[], Collections.reverseOrder()) 에러의 내용은 int[] 배열에서 Collections 메서드를 사용하지 못한다는 내용이다. int는 자료형(primitive type)이라서 사용이 불가능 한것이다. import java.util.* public class Sort { public static void main(String[] args) { int[] array = {10, 8, 5, 15, 1, 33, 22}; Integer[] arr = Arrays.stre..


원문링크 : [Java] The method sort(int[]) in the type Arrays is not applicable for the arguments (int[], Collections.reverseOrder())