/** * @author lautturi.com * Java example: // get asequential ordered IntStream from 1 to 10 */ import java.util.*; import java.util.stream.IntStream; public class Lautturi { public static void main(String[] args) { IntStream intStream = IntStream.range(1, 10); intStream.forEach(System.out::println); } }
output:
1 2 3 4 5 6 7 8 9