The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.
Hi Mahesh, Try copying the code and running it the way it is. It will give you the error “not found: value name”. name is out of scope outside the variable band. Hope, it helps. Please refer our sidebar, for more Scala Quizzes.
Q6 and Q7 I cannot see how the answers to these are both valid? Could you confirm they are correct please.Maybe question needs rewording.They are very similar code samples yet have differing correct answers?Thanks
Hey Patrick, Thanks for pointing that out. There are some technical issues with Q.6 and Q.7. Our technical team has reviewed it and made the necessary changes. Now, you can enjoy your learning hurdle-free.
First question: var band={
var name=”sublime”
name
}
It won’t raise an error. It will return sublime.
Hi Mahesh,
Try copying the code and running it the way it is. It will give you the error “not found: value name”. name is out of scope outside the variable band.
Hope, it helps. Please refer our sidebar, for more Scala Quizzes.
Q6 and Q7 I cannot see how the answers to these are both valid? Could you confirm they are correct please.Maybe question needs rewording.They are very similar code samples yet have differing correct answers?Thanks
Hey Patrick,
Thanks for pointing that out. There are some technical issues with Q.6 and Q.7. Our technical team has reviewed it and made the necessary changes.
Now, you can enjoy your learning hurdle-free.