What would be the output of the following code snippet Scala?
val l = List(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 5, 5, 8)
println(l.take(3))
Choose the correct options from below list
(1)None of the options
(2)List(1)
(3)List(1,1,1)
(4)List(5,5,8)
Answer:-(3)List(1,1,1) | |