score:0

I'm a tad unsure about what you're trying to do. Is it a line that updates or is it the formatting. This example I believe does both:

for (a <- 1 to 10) {
  Thread.sleep(1000)
  print("\rValue A: %d".format(a))
}

Related Query

More Query from same tag