Last active
March 27, 2018 11:10
-
-
Save kunals201/b9a7c5409315555a5ec2af7d3b57d16a to your computer and use it in GitHub Desktop.
example of IntStream iterate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IntStreamIterateExample { | |
public static void main(String[] args) { | |
IntStream.iterate(0, i -> i<5, i -> i+2 ) | |
.forEach(System.out::println); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment