The next() method belongs to the Abstract Value Members of the class AbstractIterator. It is defined in the class Iterator. It gives the next element of the stated iterator and advance the iterator.
Method Definition : def next(): A
Return Type :It returns the next element of the stated collection.