bidezones.com /Scala framework/Scala Multiple Choice Questions Sample Test,Sample questions

Question:
 How should we end a stream to calculate sum of elements?

1.Sink.sum_

2.Sink.fold[Int, Int](0)(_ + _)

3. Sink.sum[Int](_

4.Sink.map(_ + _)

Posted Date:-2022-11-01 12:14:18


Question:
 Is Scala is Case Sensitive language?

1.Yes

2.No

3.Maybe

4.Can't say

Posted Date:-2022-11-01 09:53:43


Question:
 Java compatibility makes Scala suitable for _______

1.Apple Development

2.Android Development

3.Google Development

4.None of the above

Posted Date:-2022-11-01 11:56:56


Question:
 Left and Right are case classes.

1.Yes

2.No

3.May be

4.Can't say

Posted Date:-2022-11-01 11:55:55


Question:
 One of the following is an erroneous function definition, can you spot it

1.def functionName(x:Int,y:Int):Int=x+ywrong

2.def functionName(x:Int,y:Int):Int={return x+y}

3.Sets

4.All of these

Posted Date:-2022-11-01 17:18:26


Question:
 What is Scala?

1.Programming language

2.Framework

3.Platform

4.None of the above

Posted Date:-2022-11-01 17:27:23


Question:
 _______ is a Scala compiler that compiles to JavaScript.

1.Scala.js B.

2.Scala.py

3.Scala.tktcorrect

4.Scala.cppwrong

Posted Date:-2022-11-01 12:00:25


Question:
10. Now a days Scala's Java compatibility makes well suited for

1.Microsoft developmentwrong

2.Google development

3.Android developmentcorrect

4.Apple development

Posted Date:-2022-11-01 06:53:29


Question:
A list is a collection which contains ___ data.

1.immutable

2.mutable

3.both (a) and (b)

4.None of the above

Posted Date:-2022-11-01 08:15:49


Question:
How can you format a string?

1.Val formatted= “%s %i”.format (mystring.myInt)

2.Val formatted= “%s %i”.formatted (mystring.myInt)

3.Val formatted= “%s %i”.formatstring(mystring.myInt)

4.Val formatted= “%s %i”.formatstrings(mystring.myInt)

Posted Date:-2022-11-01 08:18:09


Question:
How do we implement loops functionally?

1.Loop Constructs

2.Mutability

3.Side Effects

4.All of the these

Posted Date:-2022-11-01 06:26:49


Question:
How do you abruptly stop execution in the REPL?

1.Pressing Ctrl+C

2.Pressing Ctrl+X

3.Pressing Ctrl+Z

4.Pressing Ctrl+V

Posted Date:-2022-11-01 12:10:07


Question:
In Scala, apply() serves the purpose of closing the gap between Object-Oriented and Functional paradigms

1.True

2.False

3.both (a) and (b)

4.Error

Posted Date:-2022-11-01 06:55:31


Question:
It is not required to pass these __________ parameters to a method while calling it.
D. 

1.Command-line arguments

2.Default parameters

3.Implicit parameters

4.Named arguments

Posted Date:-2022-11-01 11:53:34


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

1.Yes

2.No

3.May be

4.Can't say

Posted Date:-2022-11-01 09:58:11


Question:
One of the following is an erroneous function definition, can you spot it

1.def functionName(x:Int,y:Int):Int=x+ywrong

2.def functionName(x:Int,y:Int):Int={return x+y}

3.def functionName(x:Int,y:Int):Int{x+y} ()

4.def functionName(x:Int,y:Int)={x+y

Posted Date:-2022-11-01 17:21:14


Question:
Programming language which uses both object-oriented programming and functional programming paradigms is

1.Scala

2.Ada

3.Pascal

4.Machine language

Posted Date:-2022-11-01 12:17:53


Question:
Scala is a short form of

1.Scalable language

2.Sequential language

3.Script language

4.Scalar language

Posted Date:-2022-11-01 12:18:38


Question:
Scala is designed by _______.

1.Guido van Rossum

2.John Von Neumann

3.Martin Odersky

4.None of the above

Posted Date:-2022-11-01 08:19:12


Question:
Scala is short form of

1.Scalable language

2.Sequential language

3.Script language

4.Scalar language

Posted Date:-2022-11-01 06:13:16


Question:
Scala is written in ________ language

1.C

2.Java

3.Python

4.C++

Posted Date:-2022-11-01 10:01:50


Question:
Scala runs on the _____ platform.

1. C

2.C++

3.JavaScript

4.Java

Posted Date:-2022-11-01 08:20:17


Question:
Scala stands for “____.”

1.Scalable language

2.Sequential language

3.Script language

4.Scalar language

Posted Date:-2022-11-01 17:32:02


Question:
Scala stands for ________.

1.Scalable language

2.Script language

3.Scalar language

4.Sequential language

Posted Date:-2022-11-01 09:51:12


Question:
Scala was released in the year ______.

1.2002

2.2004

3.2003

4.2005

Posted Date:-2022-11-01 08:23:12


Question:
Select the Scala construct that holds pairwise different elements of the same type

1. Groups

2.Sets

3.Maps

4.Forums

Posted Date:-2022-11-01 11:58:12


Question:
The advantage of Scala are __________.

1.High scalability

2.High maintainability and productivity

3.Less error-prone functional style

4.All of the above

Posted Date:-2022-11-01 11:50:14


Question:
The null value is of type _______

1.scl.Null

2.scala.n

3.scala.Null

4.None of the above

Posted Date:-2022-11-01 12:12:59


Question:
The ___ is a representation of a map of all published Scala libraries.

1.Scala Library Index

2.Scaladex

3.Scala Document

4.Both A and B

Posted Date:-2022-11-01 17:41:55


Question:
The ___ method is utilized to select an element in the list by its index.

1.apply()

2.unapply()

3.Both A and B

4.All of the above

Posted Date:-2022-11-01 06:57:12


Question:
This optimizer is based on functional programming construct in
A. Java
B. Scala
C. 
D. R

1.Java

2.Scala

3.Python

4.R

Posted Date:-2022-11-01 06:19:45


Question:
We can execute a Scala program in ______ modes.

1. interactive mode

2.script mode

3.both (a) and (b)

4.None of the above

Posted Date:-2022-11-01 08:26:34


Question:
What are the different types of Scala literals?

1.Character Literalswrong

2.String Literals

3.Multi-Line strings

4.All of the above mentioned

Posted Date:-2022-11-01 06:23:18


Question:
What are the few collections in Scala?

1.Array

2.Sets

3.List

4.All of the above

Posted Date:-2022-11-01 09:52:50


Question:
What are the few collections in Scala?

1.Array

2.List

3.Sets

4.All of the above

Posted Date:-2022-11-01 17:33:16


Question:
What are the Scala variables?

1.val myVal: Int=1

2.var myVar : Int=0;

3.both (a) and (b)

4.None of the above

Posted Date:-2022-11-01 09:44:55


Question:
What are the Scala variables?

1.var myVar : Int=0;

2. val myVal: Int=1;

3.both (a) and (b)

4.None of the above

Posted Date:-2022-11-01 17:29:49


Question:
What are the types of scala identifiers?

1.Alphanumeric identifiers

2.Operator identifiers

3.Mixed identifiers

4.All of these

Posted Date:-2022-11-01 06:12:05


Question:
What are the utility methods used in Scala?

1.String utility methods

2.Implicit conversion methods

3.Assertion utility methods

4.All of the above

Posted Date:-2022-11-01 06:29:08


Question:
What are three main part of akka streams?

1.Source, Flow, Sink

2.Source, Flow, BidirectionalFlow

3.ReactiveStream, Source, Flow

4.Stream, Source, Reactive

Posted Date:-2022-11-01 17:22:34


Question:
What is a monad in Scala?

1.An object that wraps another

2.A singleton object

3.A function with a single parameter

4.None of the above

Posted Date:-2022-11-01 10:03:30


Question:
What is Scala used for?

1.functional programming

2.strong static systems

3.both (a) and (b)

4.None of these

Posted Date:-2022-11-01 09:59:38


Question:
What is Scala?

1.API

2.UI development tool

3.framework

4.programming language

Posted Date:-2022-11-01 09:48:31


Question:
What is Scala’s programming paradigm?

1.Statically-Typed

2.Functional

3.Object-Oriented

4.All of these

Posted Date:-2022-11-01 08:03:24


Question:
What is the advantage of Scala?

1.Less error prone functional style

2.High maintainability and productivity

3.High scalability

4.All of the above

Posted Date:-2022-11-01 12:15:17


Question:
What is the advantage of Scala?

1.High testability

2.Provides features of concurrent programming

3.High scalability

4.All of these

Posted Date:-2022-11-01 06:22:24


Question:
What is the three main part of Akka streams?

1.Source, Flow, Sink

2.Source, Flow, BidirectionalFlow

3.ReactiveStream, Source, Flow

4.Stream, Source, Reactive

Posted Date:-2022-11-01 06:21:25


Question:
When can you use traits?

1.If the behaviour will not be reused, then make it a concrete class. Anyhow it is not a reusable behaviour

2. In order to inherit from it in Java code, an abstract class can be used

3. If efficiency is a priority then lean towards using a class

4.All of the above

Posted Date:-2022-11-01 12:17:04


Question:
Which among the following is a Scala Web Frameworks?

1.The Lift Framework

2.The Bowler framework

3.The Play framework

4.All of the above

Posted Date:-2022-11-01 08:24:12


Question:
Which among the following is a Scala Web Frameworks?

1.The Play framework

2.The Lift Framework

3.The Bowler framework

4.All of the above

Posted Date:-2022-11-01 12:06:26


Question:
Which companies use Scala?

1.LinkedIn

2.Twitter

3.Tumblr

4.All of the above

Posted Date:-2022-11-01 10:00:39


Question:
Which of the following are the IDEs(Integrated Development Environments) for Scala?

1.IntelliJ IDEA

2.VS Code

3.GNU Emacs

4.All of the above

Posted Date:-2022-11-01 17:36:20


Question:
Which of the following not shows how to declare variables of the basic numeric types?

1.val b: Byte = 1 B.

2.val s: Short = 1

3.val f: Float = 3.0

4.None of the above

Posted Date:-2022-11-01 08:04:19


Question:
Which of the following technology is good for Stream technology?

1.Apache Spark

2.Apache Hadoop

3.Apache Flinkcorrect

4.None of the above

Posted Date:-2022-11-01 06:11:01


Question:
Which one of the following is a feature of Scala strings?

1. It can be changed.

2.It is a mutable object.

3.It allows creating multiline strings by including the string inside three double quotes.

4.All of the above

Posted Date:-2022-11-01 08:17:06


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

1.boolean contentEquals(StringBuffer sb)

2.String concat(String str)

3.byte getBytes()

4.All of the above

Posted Date:-2022-11-01 12:01:28


Question:
Which one of the following Programming languages uses both object-oriented programming and functional programming paradigms?

1.Scala

2.Machine language

3.Pascal

4.Ada

Posted Date:-2022-11-01 17:30:51


Question:
Without an explicit import, maps in Scala are by default _______

1.Mutable

2.Immutable

3.both (a) and (b)

4.None of the above

Posted Date:-2022-11-01 11:51:23


Question:
Without an explicit import, maps in Scala are by default:

1.Immutable

2.Mutable

3.None

4.None of the above

Posted Date:-2022-11-01 07:00:11


Question:
____ abstraction from functional programming helps us deal with updating complex immutable nested objects.

1.Case classes

2.Lens

3.Extractors

4.None of the above

Posted Date:-2022-11-01 12:05:23


Question:
____ is a Scala compiler that compiles to JavaScript.

1.Scala.py

2.Scala.js

3.Scala.tkt

4.None of the above

Posted Date:-2022-11-01 08:21:11


Question:
_____ is used to define a function in Scala

1.function

2. def

3.func

4.All of the above

Posted Date:-2022-11-01 11:52:23


More MCQS[bidezones.com ]

  1. Scala Multiple Choice Questions
  2. Scala Multiple-Choice Questions Set 1
  3. Scala Multiple-Choice Questions Set 2