Category: cool Java stuff


Java: Endless Stream of Alternating 0s and 1s

This article shows how to create an endless series of zeros and ones using the Java 8 stream API.

The result should look like this:

010101010101010101....