sbt is an open-source build tool for Scala and Java projects. Can it execute tasks in parallel?
Correct
Incorrect
Question 2 of 20
2. Question
Which of the following statements is untrue about a functor in Scala?
Correct
Incorrect
Question 3 of 20
3. Question
Select the true statements from the following:
Correct
Incorrect
Question 4 of 20
4. Question
Left and Right are case classes. True or False?
Correct
Incorrect
Question 5 of 20
5. Question
Which of the following statements are true about Either?
Correct
Incorrect
Question 6 of 20
6. Question
What Boolean value do the following statements return? case class People(name:String,age:Int) val people1=People(“Ayushi”,22) val people2=People(“Ayushi”,22) people1==people2
Correct
Incorrect
Question 7 of 20
7. Question
Select the correct output for the following code: val leaders=collection.mutable.Buffer(“Reykon”) leaders+=”obama” println(leaders)
Correct
Incorrect
Question 8 of 20
8. Question
Looking at the previous code, can you predict the output of the following code? val stuff=collection.mutable.Buffer(“blue”) stuff+=44 println(stuff)
Correct
Incorrect
Question 9 of 20
9. Question
Which of the following function definitions are erroneous?
Correct
Incorrect
Question 10 of 20
10. Question
Scala is also a:
Correct
Incorrect
Question 11 of 20
11. Question
Of the following, select the Scala construct that holds pairwise different elements of the same type.
Correct
Incorrect
Question 12 of 20
12. Question
Select the correct value specified by the following line of code: “abcde” ensuring (_.length>3)
Correct
Incorrect
Question 13 of 20
13. Question
Which is the correct value of the following expression? List(1,2,3)flatMap(x=>List(x,4))
Correct
Incorrect
Question 14 of 20
14. Question
For which kind of data should you use a case class?
Correct
Incorrect
Question 15 of 20
15. Question
The following technique/construct lets us transform a function with multiple arguments into a chain of functions. Each of these has one single argument.
Correct
Incorrect
Question 16 of 20
16. Question
How do you abruptly stop execution in the REPL?
Correct
Incorrect
Question 17 of 20
17. Question
Which of the following is true about Scala and Java?
Correct
Incorrect
Question 18 of 20
18. Question
Scala is a portmanteau for:
Correct
Incorrect
Question 19 of 20
19. Question
Its Java compatibility makes Scala suitable for:
Correct
Incorrect
Question 20 of 20
20. Question
A collection of type collection.Seq is immutable.
Correct
Incorrect
Have you enjoyed the Scala Quiz? Share your feedback with us through comment box!
Your 15 seconds will encourage us to work even harder Please share your happy experience on Google
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.
I think you have this one backwards.
Q.20 A collection of type collection.Seq is immutable.
True
Correct Answer: False
Hi Konstantin,
Thanks for the observation, we have corrected the answer. You can refer our next Scala Quiz for more questions.
Regards,
DataFlair
> Select the correct output for the following code:
> val leaders=collection.mutable.Buffer(“Reykon”)
> leaders+=”obama”
> println(leaders)
> ArrayBuffer(Reykon, Obama)
That’s plain wrong!
It’s obviously “ArrayBuffer(Reykon, obama)”…