4 ways to make a for loop in Java
java planeta-codigo programacion
The usual way in Java to do a loop is with a for or while statement but with the addition of iterators in Java 5 it is not necessary to have a variable to keep the index of the loop. Since Java 8, streams have been added that offer other new ways of iterating over the elements of a collection, in the latter case with techniques of functional languages.
Continue reading...