O'Reilly logo
  • Yan Ren thinks this is interesting:

first character of a string in Scala? The last character

From

Cover of Scala for the Impatient, Second Edition

Note

scala> "abcde"(0) res19: Char = a

scala> "abcde".last res20: Char = e