onlinetutorialspoint.com
Java 8 forEach with index Example
In older versions of java like before java 8, we usually iterate for loop using indexes, for example, if we want to print numbers from 0 to 10 we would generally write code like below. for (int i = 0; i