생활
자바 Iterator 객체의 크기비교
함수의 매개변수를 public static int commonSingle(Iterator first, Iterator second) 이렇게 만들었고 first와 second는 ArrayList<String>의 iterator 입니다. 이때 제가 원하는건 first와 second의 크기비교를 진행하고 싶은데 Iterator 객체는 comparaTo메소드가 없어서 어떻게 진행을 해야할지 잘 모르겠습니다. 어떻게 하면 크기를 비교할 수 있을까요??
1개의 답변이 있어요!