Scala/制御構文/while

for 同様にループを制御する while

これはホントに Java とかと同様

var i:Int = 0
while (i < 10) {
  println(i)
  i = i + 1
}