Java: Equivalent of Python's range(int, int)?

后端 未结 14 1843
北荒
北荒 2020-12-02 08:17

Does Java have an equivalent to Python\'s range(int, int) method?

14条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 08:46

    If you mean to use it like you would in a Python loop, Java loops nicely with the for statement, which renders this structure unnecessary for that purpose.

提交回复
热议问题