Qtr No. 213, New Town Yehlanka Indore 454775
Janet is working on Scala Future and map collection concept. Help Janet predict the output for the given code.
(Assume all the necessary imports have been done.)
object ScalaFuture extends App {
val myList = Future{List('a', 2, "hey", 3)}
val result = myList.map(x => x.apply(3).equals("hey"))
result.onSuccess {
case x => println(x)
}
result.onFailure {
case y => println("Error")
}
}
hey
error
true
false
To get all Infosys Certified Scala Programmer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in