Elements are Sequence accessed using Round brackets...ie(), unlike in Java where we use []
scala> val data = List(1, 2, 3, 4) data: List[Int] = List(1, 2, 3, 4) scala> val second = data(1) second: Int = 2
No comments:
Post a Comment