In-depth interpretation of for-each loop (note recording)

The for-each loop uses iterators to iterate, which will produce an iterator object, so it is best to avoid using for-each loops in the inner loop of the nested loop, otherwise too many intermediate objects will be generated.

Guess you like

Origin blog.csdn.net/qq_35207086/article/details/123758246