An alternative to loop constructs in Java
In Java 8 you can use streams, they tend to make the code quite more compact:

IntStream.range(0, 5).forEach(i -&gt; System.out.println("Hello World!"));


I would recommend reading the documentation of IntStream and Streams in general