Ask Question
23 June, 11:31

Related to Scala Constuct

1 Which of the following are the key concepts of Functional Programming a. Immutability b. Pure functions c. Inheritance d. Referential Transparency.

2 Can the following pseudo function be considered a pure function? function getMeTimeAdded (arg Integer) = currentTime + Integer

3 You can modify an immutable object once created (Yes/No)

4 Scala is a pure functional programming language (True/False)

5 Functional programming language cannot be an object oriented language too (True/False)

6 For the given statement,

val s = List (1,2,3)

What would be the type of s?

7 Is this a valid expression val f: Int = (x: Int) = > x + 1

8 What is the preferred qualifier for defining a variable in Scala.

9 What is the default class List is imported from?

10 Functions are first class objects in function

+1
Answers (2)
  1. 23 June, 13:14
    0
    1 b

    ...
  2. 23 June, 13:24
    0
    1. B (pure functions)

    2. No, It is an inheritance.

    3. No, immutable objects are objects which cannot be changed.

    4. False, Scala programming is a pure object oriented programming.

    5. True, functional programming is a layer above object oriented programming.

    6. The type of s would Scala

    7. Yes, the expression is valid

    8. The best qualifier is myvar (syntax variable).

    9. It is imported from Scala

    10. Yes, a function is said to be first class when it is treated like other variables.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Related to Scala Constuct 1 Which of the following are the key concepts of Functional Programming a. Immutability b. Pure functions c. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers