@@ -0,0 +1,1124 @@
+package ru.pravvich.lesson_3;%0A%0Aimport java.io.File;%0Aimport java.util.Arrays;%0Aimport java.util.Comparator;%0A%0Apublic class CheckSort %7B%0A    public static void main(String%5B%5D args) %7B%0A        // %D1%81%D0%BE%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0 %D0%BF%D0%B5%D1%80%D0%B2%D1%8B%D0%B9 %D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%0A        String%5B%5D arr = %7B%22ar%22,%22h%22,%22boot%22%7D;%0A        Comparator%3CString%3E stringLengthComparator = new StringLengthSort();%0A        Arrays.sort(arr,stringLengthComparator);%0A        System.out.println(Arrays.toString(arr));%0A%0A        //%D0%BA%D0%BE%D1%80%D0%BE%D1%82%D0%BA%D0%B8%D0%B9 %D0%B1%D0%B5%D0%B7 %D0%BE%D1%82%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B3%D0%BE %D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%B0 %D1%85%D0%B7 %D0%BA%D0%B0%D0%BA %D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B0%D0%B5%D1%82%0A        String%5B%5D arr1 = %7B%22ar%22,%22h%22,%22boot%22%7D;%0A        Comparator%3CString%3E comprator = (o1,o2) -%3E o1.length() - o2.length();%0A        Arrays.sort(arr1,comprator);%0A        System.out.println(Arrays.toString(arr1));%0A%0A    %7D%0A%0A    private static class StringLengthSort implements Comparator%3CString%3E %7B%0A        @Override%0A        public int compare(String o1, String o2) %7B%0A            if (o1.length() %3E o2.length()) %7B%0A                return 1;%0A            %7D else %7B%0A                if (o1.length() %3C o2.length()) %7B%0A                    return -1;%0A                %7D else %7B%0A                    return 0;%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

add CheckSort for talk about this