Scala MCQ Questions

Scala MCQ Questions

  • Satyam Jaiswal
  • 25th Nov, 2021

We are introducing here the best Scala MCQ Questions, which are very popular & asked various times. This Quiz contains the best 25+ Scala MCQ with Answers, which cover the important topics of Scala. for which, you can perform best in Scala Exams, Interviews, and Placement activities.

Scala MCQ Questions

1) What are the Scala variables?

  • A. val myVal: Int=1
  • B.var myVar : Int=0;
  • C.Both A and B
  • D.None of the above

2) What is Scala?

  • A. API
  • B.UI development tool
  • C.framework
  • D.programming language

3) Scala stands for ________.

  • A. Scalable language
  • B.Script language
  • C.Scalar language
  • D.Sequential language

4) What are the few collections in Scala?

  • A. Array
  • B.Sets
  • C.List
  • D.All of the above

5) Is Scala is Case Sensitive language?

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

6) Omitting a semicolon(;) at the end of a statement causes the compiler to throw an error.

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

7) A closure is a function whose return value depends on a variable declared outside it.

  • A. True
  • B.False

8) What is Scala used for?

  • A. functional programming
  • B.strong static systems
  • C.Both A and B
  • D.None of the above

9) Which companies use Scala?

  • A. LinkedIn
  • B.Twitter
  • C.Tumblr
  • D.All of the above

10) Scala is written in ________ language.

  • A. C
  • B.Java
  • C.Python
  • D.C++

11) What is a monad in Scala?

  • A. An object that wraps another
  • B.A singleton object
  • C.A function with a single parameter
  • D.None of the above

12) The advantage of Scala are __________.

  • A. High scalability
  • B.High maintainability and productivity
  • C.Less error prone functional style
  • D.All of the above

13) Without an explicit import, maps in Scala are by default ________.

  • A. Mutable
  • B.Immutable
  • C.Both A and B
  • D.None of the above

14) ______ is used to define a function in Scala.

  • A. function
  • B.def
  • C.func
  • D.All of the above

15) It is not required to pass these __________ parameters to a method while calling it.

  • A. Command-line arguments
  • B.Default parameters
  • C.Implicit parameters
  • D.Named arguments

16) What is Scala’s programming paradigm?

  • A. Statically-Typed
  • B.Functional
  • C.Object-Oriented
  • D.All of the above

17) Left and Right are case classes.

  • A. Yes
  • B.No
  • C.May be
  • D.Can't say

18) Java compatibility makes Scala suitable for ________.

  • A. Apple Development
  • B.Android Development
  • C.Google Development
  • D.None of the above

19) Select the Scala construct that holds pairwise different elements of the same type.

  • A. Groups
  • B.Sets
  • C.Maps
  • D.Forums

20) Scala is designed by ______.

  • A. James Gosling
  • B.John Von Neumann
  • C.Guido van Rossum
  • D.Martin Odersky

21) _______ is a Scala compiler that compiles to JavaScript.

  • A. Scala.js
  • B.Scala.py
  • C.Scala.tkt
  • D.Scala.cpp

22) Which one of the following is not a method defined by java.lang.String class?

  • A. boolean contentEquals(StringBuffer sb)
  • B.String concat(String str)
  • C.byte getBytes()
  • D.All of the above

23) ________ abstraction from functional programming helps us deal with updating complex immutable nested objects.

  • A. Case classes
  • B.Lens
  • C.Extractors
  • D.None of the above

24) Which among the following is a Scala Web Frameworks?

  • A. The Play framework
  • B.The Lift Framework
  • C.The Bowler framework
  • D.All of the above

25) Scala was released in the year ______.

  • A. 2001
  • B.2002
  • C.2003
  • D.2004

26) We can execute a Scala program in ______ modes.

  • A. script mode
  • B.interactive mode
  • C.Both A and B
  • D.None of the above

27) Scala has singleton objects, which are essentially classes with only one instance.

  • A. True
  • B.False

28) Which one of the following is a feature of Scala strings?

  • A. It is mutable object.
  • B.It allows to create multiline strings by including the string inside three double-quotes.
  • C.It can be changed.
  • D.All of the above

29) How do you abruptly stop execution in the REPL?

  • A. Pressing Ctrl+C
  • B.Pressing Ctrl+X
  • C.Pressing Ctrl+Z
  • D.Pressing Ctrl+V

30) The null value is of type _________.

  • A. scl.Null
  • B.scala.n
  • C.scala.Null
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Nov
UML MCQ
01st
Nov
5G MCQ Questions
01st
Nov
Hadoop MCQ
01st
Feb
Salesforce MCQ