What is the difference between Iterator and SplitIterator
Posted On
Posted By admin
In this post, I will be explaining the difference between a Iterator and SplitIterator.
Iterator | SplitIterator |
---|---|
Present in Java right from the start | Added by Java 8 |
Allows iterating over the elements of a collection individually | Allows iterating over the elements of a collection individually as well as in bulk |
Can be used only for iterating over a Collection | Can be used to iterate over a Stream as well as a Collection |
Only allows sequential processing | Allows both sequential as well as parallel processing |
If you like this post, please do let me know via the comments box below. You can also connect with me via my Facebook Page or subscribe to my Youtube channel!