score:0

Yes, currentIndex is a reference - so changes to it will be done atomically.

Check:

Are 64 bit assignments in Java atomic on a 32 bit machine?


Related Query