Contact: aviboots(AT)netvision.net.il
32,307 questions
42,482 answers
573 users
import scala.util.control.Breaks._ object BreakFromForLoop_Scala { def main(args: Array[String]): Unit = { breakable { for (i <- 0 to 10) { print(s"${i} ") if (i == 5) break } } } } /* run: 0 1 2 3 4 5 */