MCQs > IT & Programming > Scala > You have created an array using val. Can you change the value of any element of the array—and why or why not?

Scala MCQs

You have created an array using val. Can you change the value of any element of the array—and why or why not?

Answer

Correct Answer: Yes, the reference to the array is immutable, so the location that the array points to is immutable. The values in the array are mutable.

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