[java]정렬하기(Sort), 람다식
·
JAVA
20240820수업정렬:Sorting오름차순 정렬:Ascending 1234, ABCD, 가나다라 순, 선동률 순, 방어율 순내림차순 정렬:Descending 9876, DCBA, ..., 타율, 홈런순, 승수Array정렬①Array.sort()int [] nums = {8, 5, 4, 7, 1};//초기값 설정 System.out.println("1."); System.out.println(Arrays.toString(nums)); Arrays.sort(nums); //오름차순 정렬 System.out.println(Arrays.toString(nums));Arrays.sort(nums, Collections.reverseOrder()); =>error∵int[] 배열은 reverseOrder할수가..