DEV Community

Discussion on: Challenge: Write a program that never stops

Collapse
tonnoz profile image
tonnoz • Edited on

Java8

The matrix has you:

Stream.iterate("", i -> i = Character
    .toString((char) new Random().nextInt(255)))
.forEach(i-> System.out.print(i));
Collapse
tonnoz profile image
tonnoz
Stream.iterate('a', i-> i= (char)new Random().nextInt(255)).forEach(i-> System.out.print(i));