Online said for each data type limitation, but if I write:
For (Object x: arr) {
System. The out. Println (x);
}
So not data types not limited??
Why use iterator
?Don't understand...
O great god answer
CodePudding user response:
In an iterator,CodePudding user response:
For each cycle of the underlying code is to use an iteratorCodePudding user response:
For each is to use an iteratorCodePudding user response:
See their habits, it is not necessary to do comparison,Upstairs say yes, will be optimized for each iterator, decompiled see to know,
CodePudding user response:
Thank you for yourCodePudding user response:
If a pure traversal, fluidization, I suggest you to process the data in the stream safer than you use iterator processing