How to check if processing the last item in an Iterator? December 19, 2023 by Tarik If iter.hasNext() is false after iter.next() then it is the last item. Happy coding.