pair 클래스 구현하기 class Pair{ private int x; private int y; Pair(int x, int y){ this.x = x; this.y = y; } public int getX(){ return this.x; } public int getY(){ return this.y; } } stream과 람다함수로 정렬 (고급)Pair(x,y)를 담고 있는 List를 y의 오름차순으로 정렬하기list = list.stream().sorted((p1,p2)->Integer.compare(p1.getY(),p2.getY()).collect(Collectors.toList());정렬 기준을 p1.y와 p2.y를 compare하고 p1.y>p2.y일때 양수 반환과 동시에 객체들..