Scala For Big Data Set 1
Free Online Best Scala For Big Data MCQ Questions for improve your basic knowledge of Scala For Big Data. This Scala For Big Data set 1 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed Scala For Big Data Set 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which of the following statements will compile and run?
A | var msg="Testing" println(msg+" a test") |
B | val msg:String = "Testing" println(msg+" a horse "); |
C | val msg='Testing' println(msg=msg+Testing) |
D | var msg="Testing" println("msg is :"+(msg=msg+" " +msg) |
Question 2 |
We use the following keyword to define a function in Scala____
A | def |
B | func |
C | function |
D | We use the data type instead |
Question 3 |
A FUNCTOR must have_____
A | map function |
B | flatMap function |
C | map and flatMap both |
D | None of the above |
Question 4 |
Which One of the following is an erroneous function definition?
A | def functionName(x:Int,y:Int):Int=x+y |
B | def functionName(x:Int,y:Int):Int={return x+y} |
C | def functionName(x:Int,y:Int):Int{x+y} () |
D | def functionName(x:Int,y:Int)={x+y} |
Question 5 |
What is Scala?
A | Programming language |
B | Framework |
C | Platform |
D | None of the above |
Question 6 |
The ways in which Scala language is deployed in real-world scenarios are_____
A | Writing web applications |
B | Applications working with streaming data |
C | Concurrency and distributed applications |
D | All of the above |
Question 7 |
Scala is a short form of____
A | Scalable language |
B | Sequential language |
C | Script language |
D | Scalar language |
Question 8 |
What is advantages of Scala?
A | Less error prone functional style |
B | High maintainability and productivity |
C | High scalability |
D | All of the Above |
Question 9 |
Consider the following statements about vals and vars___
A | val is a constant |
B | Reassigning to a val throws an error |
C | Reassigning to a var doesn’t throw an error |
D | All of the above |
Question 10 |
Scala programming language is invented by___
A | Mr. Martin Odersky |
B | James Gosling |
C | Dennis Richie |
D | None of the above |
Question 11 |
Programming language which uses both object-oriented programming and functional programming paradigms is____
A | Scala |
B | Ada |
C | Pascal |
D | Machine language |
Question 12 |
What are the Scala variables?
A | var myVar : Int=0; |
B | val myVal: Int=1; |
C | both a and b |
D | None of the above |
Question 13 |
How should we end a stream to calculate sum of elements?
A | Sink.sum_ |
B | Sink.fold[Int, Int](0)(_ + _) |
C | Sink.sum[Int](_) |
D | Sink.map(_ + _) |
Question 14 |
What are the few collections in Scala?
A | Array |
B | List |
C | Sets |
D | All of the above |
Question 15 |
What is Scala’s programming paradigm?
A | oops |
B | Statically-Typed |
C | Functional |
D | All of the Above |
Question 16 |
Which of the following is true about Scala type inference ?
A | The data type of the variable has to be mentioned explicitly |
B | The type of the variable is determined by looking at its value |
C | both a and b |
D | None of the above |
Question 17 |
Which of the following is true about Scala language ?
A | Scala is a statically typed language |
B | Scala is an object oriented language |
C | Scala is a functional programming language |
D | All of the above |
Question 18 |
What are three main part of akka streams?
A | Source, Flow, Sink |
B | Source, Flow, BidirectionalFlow |
C | ReactiveStream, Source, Flow |
D | Stream, Source, Reactive |
Question 19 |
The difference between a val and a var is that_____
A | val is a constant |
B | var is a constant |
C | var is a variable |
D | reassigning a value to val is an error |
Question 20 |
Is having ; ( semi-colon) at the end of the expressions in Scala an error ?
A | TRUE |
B | FALSE |
C | some times True |
D | All of the above |
Question 21 |
bt is an open-source build tool for Scala and Java projects. Can it execute tasks in parallel?
A | it can only execute one task at once |
B | Yes |
C | No |
D | None of the above |
Question 22 |
What is the output/error of the following statement ?
val myA= Array(2,3,4)
myA.update(1,5)
A | myA now contains 2,5,4 |
B | its a compilation error at line 2, of the update method's existant |
C | Error as myA can not be updated as it is a val not var |
D | None of the above |
Question 23 |
Which of the following statements are true about Lists and Arrays?
A | Lists are immutable |
B | Arrays are mutable |
C | Once you have declared a List, you cannot add more elements later |
D | All of the above |
Question 24 |
What is the advantage of Scala?
A | Less error prone functional style |
B | High maintainability and productivity |
C | High scalability |
D | All of the above |
Question 25 |
When can you use traits?
A | If the behaviour will not be reused, then make it a concrete class. Anyhow it is not a reusable behaviour |
B | In order to inherit from it in Java code, an abstract class can be used |
C | If efficiency is a priority then lean towards using a class |
D | All of the above |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!