What if you attempt to call
next() when no more nodes exist? Does it throw an
ArrayIndexOutOfBounds exception? No, but close. It throws a
NoSuchElementException. Before calling next(), you should call
hasNext().
hasNext() returns true if there is at least one more element after the
current position. Otherwise, it returns false.