Slide 31
Slide 31 text
@elmanu
EXPLICIT TYPING
val foo: String = "Bar" // foo: String = Bar
val answer: Int = 42 // answer: Int = 42
val price: Double = 9.99 // price: Double = 9.99
val nums: List[Int] = List(1, 2, 3) // nums: List[Int] =
List(1, 2, 3)
val map: Map[String, List[Int]] = Map("abc" -> List(1, 2, 3))
// map: scala.collection.immutable.Map[String,List[Int]] =
Map(abc -> List(1, 2, 3))
Dienstag, 03. Dezember 13