SHOW:
|
|
- or go back to the newest paste.
1 | import static java.lang.System.out; | |
2 | ||
3 | import java.util.stream.IntStream; | |
4 | class SomeClass { | |
5 | - | IntStream.range(1, 6).mapToObj(char[]::new).map(String::new) |
5 | + | |
6 | - | .map(s -> s.replace('\0', '*')).forEach(System.out::println); |
6 | + | IntStream.range(1, Integer.parseInt(args[0])).forEach( |
7 | i -> { | |
8 | IntStream.range(0, i).forEach(x -> out.print('*')); | |
9 | out.println(); | |
10 | }); | |
11 | } | |
12 | } |