Java 8 IntStream for an int range?

前端 未结 1 1592
情深已故
情深已故 2020-12-30 22:53

Is there a way to create an IntStream for a range of ints?

Like if I wanted to stream values 1 to 1000, I could invoke some IntStream stat

1条回答
  •  囚心锁ツ
    2020-12-30 23:38

    Never mind, I don't know why I missed it in the API documentation after reading it several times...

    IntStream.range(1,1000)
    

    0 讨论(0)
提交回复
热议问题