ArrayList<Integer> list = new ArrayList<>(); if(list.isEmpty()) { System.out.println(-1); return; }
리스트가 비어있는지 확인 list.isEmpty()