MCQs > IT & Programming > Scala > For the code below, Choose the correct statement that describes an issue with the code?

Scala MCQs

For the code below, Choose the correct statement that describes an issue with the code?

val L = List[String]() for (a <- 1 to 100) { L :+ a.toString }

Answer

Correct Answer: “L:+ a.toString” is returning a new list each time

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