Java lamada:IntStream

--range(int startInclusive, int endExclusive):前包后不包

IntStream.range(0, 10).forEach(System.out::print);

输出:0123456789

--rangeClosed(int startInclusive, int endInclusive):前后全包

IntStream.rangeClosed(0, 10).forEach(System.out::print);

输出:012345678910

同样 LongStream

相关文章:

  • 2021-08-03
  • 2021-09-02
  • 2021-06-17
  • 2022-02-07
  • 2022-01-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-07-30
相关资源
相似解决方案