GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Scala Quiz - 1

himanshu arora 10 Fragen

Quiz starten

Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.

Fragen in diesem Quiz (10)

  1. 1What is NOT necessarily a property of a monoid ?
    1. AAssociativity
    2. BIdentity
    3. CFunctions map & flatMap
    4. DClosure
  2. 2SBT can execute tasks in parallel ?
    1. ARichtig
    2. BFalsch
  3. 3What is the LEAST true statement for an actor akka ?
    1. ACommunicates using messages
    2. BUsed for concurrency management
    3. CAsynchronous and non-blocking
    4. DUsed for parallel programming
  4. 4Future.successful(10)
    Future.successful(20)

    The above mentioned 2 futures run on two different threads ?
    1. ARichtig
    2. BFalsch
  5. 5val mySeq = Seq("Hello world", "How are you doing", "See you soon")
    val mySeqMap = mySeq.map(_.split(" ")).filter(_.length > 3)
    val mySeqFlatMap = mySeq.flatMap(_.split(" ")).filter(_.length > 3)

    What are the possible values of mySeqMap and mySeqFlatMap respectively ?
    1. AmySeqMap = List(How, are, you, doing)
      mySeqFlatMap = List(Hello, world, doing, soon)
    2. BmySeqMap = List(List(How, are, you, doing))
      mySeqFlatMap = List(Hello, world, doing, soon)
    3. CmySeqMap = List(Hello, world, doing, soon)
      mySeqFlatMap = List(List(How, are, you, doing))
    4. DmySeqMap = List(List(How, are, you, doing))
      mySeqFlatMap = List(Hello, world, doing, are, you, soon)
  6. 6case class People(name: String, age: Int)
    val people1 = People("Jon", 30)
    val people2 = People("Jon", 30)

    people1 == people2 ?
    1. ARichtig
    2. BFalsch
  7. 7A FUNCTOR must have ?
    1. Amap function
    2. BflatMap function
    3. Cmap and flatMap both
    4. Dnone of the above
  8. 8trait F[+A] {
    def {...}
    }

    What does +A represent ?
    1. AUpper bound
    2. BContravariant type parameter
    3. CCovariant type parameter
    4. DLower bound
  9. 9What's a closure ?
    1. AA function whose return value depends upon a variable declared outside of that function
    2. BA function that takes another function as an argument
    3. CA function that returns a function as argument
    4. DA function that returns a future
  10. 10Which of the following statements about a scala Either are true (multiple responses possible) ?
    1. AIt has two subtypes Left and Right
    2. BLeft represents success case and Right represents error case
    3. CLeft represents error case and Right represents success case
    4. DBoth Left and Right are case classes

Informationen

Beschreibung
The 1st scala quiz for Scala.IO
Sprache
English
Aufrufe
282
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck