Loading, please wait...

Scala MCQ Quiz (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

12. Which of the following are true regarding While loop?

  • Repeats a statement or group of statements while a given condition is true.
  • It tests the condition before executing the loop body.
  • Both A and B
  • None of the above

13. The variable defined using __ keywords are mutable and can be changed any number of times

  • var
  • val
  • var_name
  • None of the above

14. Which one of the following keyword use to define a function in Scala?

  • def
  •  func
  • function
  • We use the data type instead

15. Select the output for the following line of code: println(40.getClass)

  • This causes a compilation error
  • This causes a runtime error
  • int
  • 40

16. Select the correct statements from the following:

  • Unit is like void in Java
  • () is an empty tuple that represents a Unit
  • Both A and B
  • None of the above