package kysimused2; import java.util.*; public class Primes2 { public static void main(String[] args) { System.out.println(new Integer(1)==new Integer(1)); Integer[] primes = { 2, 7, 5, 3 }; MySort ms = new MySort(); Arrays.sort(primes, ms); Arrays.sort(primes, (a1, a2) -> a1-a2); for (Integer p2 : primes) System.out.print(p2 + " "); } static class MySort implements Comparator { public int compare(Integer x, Integer y) { return y.compareTo(x); } } }