The iterator
HasNext () method
If there is a next element, it is true
Next () method
Returns data for the next element
The sample code
Precautions Delete actions
You cannot delete an iterated collection
Otherwise, the following error will be reported