for循环中的多个变量,kotlin

时间:2018-12-19 13:19:33

标签: for-loop variables kotlin

是否可以在Kotlin中使用多个变量进行for循环?我正在寻找与此类似的东西:

for(x in 0..2, y in 3..6)

科特林有可能吗?

在Java中,您可以这样做:

for(x=0, y=3; x<=2 && y<= 6; x++, y++) 

0 个答案:

没有答案
相关问题