Scala Online Test | A Secret Box of Knowledge
Scala course with real-time projects Start Now!!
After learning scala, we come up with a tricky Scala Online Test. This Scala Online Test has more interesting MCQ’s for Scala Programming.
Do not forget to check other Scala quizzes as well in this series of scala quiz to revise all concepts thoroughly:
- Scala Quiz – 1
- Scala Quiz – 2
- Scala Quiz – 3
- Scala Quiz – 4
Quiz Summary
0 of 20 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 20 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
- Question 1 of 20
1. Question
sbt is an open-source build tool for Scala and Java projects. Can it execute tasks in parallel?
CorrectIncorrect - Question 2 of 20
2. Question
Which of the following statements is untrue about a functor in Scala?
CorrectIncorrect - Question 3 of 20
3. Question
Select the true statements from the following:
CorrectIncorrect - Question 4 of 20
4. Question
Left and Right are case classes. True or False?
CorrectIncorrect - Question 5 of 20
5. Question
Which of the following statements are true about Either?
CorrectIncorrect - 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==people2CorrectIncorrect - Question 7 of 20
7. Question
Select the correct output for the following code:
val leaders=collection.mutable.Buffer(“Reykon”)
leaders+=”obama”
println(leaders)CorrectIncorrect - 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)CorrectIncorrect - Question 9 of 20
9. Question
Which of the following function definitions are erroneous?
CorrectIncorrect - Question 10 of 20
10. Question
Scala is also a:
CorrectIncorrect - Question 11 of 20
11. Question
Of the following, select the Scala construct that holds pairwise different elements of the same type.
CorrectIncorrect - Question 12 of 20
12. Question
Select the correct value specified by the following line of code:
“abcde” ensuring (_.length>3)CorrectIncorrect - Question 13 of 20
13. Question
Which is the correct value of the following expression?
List(1,2,3)flatMap(x=>List(x,4))CorrectIncorrect - Question 14 of 20
14. Question
For which kind of data should you use a case class?
CorrectIncorrect - 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.
CorrectIncorrect - Question 16 of 20
16. Question
How do you abruptly stop execution in the REPL?
CorrectIncorrect - Question 17 of 20
17. Question
Which of the following is true about Scala and Java?
CorrectIncorrect - Question 18 of 20
18. Question
Scala is a portmanteau for:
CorrectIncorrect - Question 19 of 20
19. Question
Its Java compatibility makes Scala suitable for:
CorrectIncorrect - Question 20 of 20
20. Question
A collection of type collection.Seq is immutable.
CorrectIncorrect
Have you enjoyed the Scala Quiz? Share your feedback with us through comment box!
Did you like this article? If Yes, please give DataFlair 5 Stars on Google
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)”…