s.LowerCase), 2.scala> List("A", "Cat").map(s => s.toLowerCase), 3.scala> List("A", "Cat").map(s => s.LowerCase), 4.All of the above">
MCQs > IT & Programming > Scala > The map method on List (and Seq), transforms each element of a collection based on a function. For example, if we have a List[String] and want to convert it to all lowercase?

Scala MCQs

The map method on List (and Seq), transforms each element of a collection based on a function. For example, if we have a List[String] and want to convert it to all lowercase?

Answer

Correct Answer: scala> List("A", "Cat").map(s => s.toLowerCase)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it