When I run the following program :
object Problem {
def main(args: Array[String]) = {
val v = 53.toString
val w = v(0).toInt
println(w)
}
}
it prints out 53, instead of what I would have expected, 5. Can someone help me understand why?
UPDATE: The same thing happens if I use charAt instead of the array syntax