[ISSUE] "integers" within code snippet
stetsche opened this issue · comments
Article and Module Links
https://www.baeldung.com/java-inifinite-streams#do-while---the-stream-way
Describe the Issue
Within the code snippet in paragraph 6. there is an out of place "integers":
Stream<Integer> integers = Stream
.iterate(0, i -> i + 1);
integers <--
.limit(10)
.forEach(System.out::println);
Hey @stetsche,
Thank you for the feedback. Actually, the code snippet contains two statements:
(1) Stream integers = Stream.iterate(0, i -> i + 1);
(2) integers.limit(10).forEach(System.out::println);
Regards,
Team.