0 of 25 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 25 Questions answered correctly
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
What will be the output?
val someSet = mutableSetOf(1, 2, 2, 3) someSet.add(2) someSet.add(5) println(someSet)
What will be the output?
val someList = listOf(1, 2, 3) someList.add(5) println(someList)
What will be the output?
val someSet = mutableSetOf(1, 2, 3) someSet.add(null) someSet.add(3) println(someSet)
What is the default implementation of Set in Kotlin?
What will be the output?
val someSet = mutableSetOf(1, 2, 3) someSet.add(5) someSet.add(4) println(someSet)
What will be the output?
val someMap = mapOf(1 to "a", 2 to "b") val anotherMap = mapOf(2 to "b", 1 to "a") println(someMap == anotherMap)
What is the default implementation of a Map in Kotlin?
What will be the output?
val someMap = mapOf(1 to "a", 2 to "b", 1 to "c") println(someMap)
What will be the output?
val emptyList = emptyList() println(emptyList)
What will be the output?
val someList = List(3) { it * 10 } println(someList)
What will be the output?
val someList = mutableListOf(1, 2, 3) val anotherReference: List= someList anotherReference.add(4) println(someList)
What will be the output?
val someList = listOf("a", "bb", "cc", "ddd") val someMap = someList.associateBy { it.length } println(someMap)
What will be the output?
val someList = listOf("a", "bb", "cc", "ddd") val someMap = someList.groupBy { it.length } println(someMap)
What will be the output of this referential equality comparison?
val someList = listOf(1, 2, 3, 4) val filteredList = someList.filter { it % 2 == 0 } println(someList === filteredList)
What will be the output?
for (x in 1..5) print(x)
What will be the output?
for (x in 5 downTo 1) print(x)
What will be the output?
for (x in 1..10 step 2) print(x)
What will be the output?
for (x in 1 until 5) print(x)
How can we check if a range contains element x?
Which sentence is correct in terms of Sequences multi-step processing? Example:
sequenceOf(1, 2, 3, 4) .map { it * 10 } .filter { it % 3 == 0 }
Which sentence is correct in terms of Iterable multi-step processing? Example:
listOf(1, 2, 3, 4) .map { it * 10 } .filter { it % 3 == 0 }
What will be the output?
val setOne = setOf(1, 2, 3, 4) val setTwo = setOf(3, 4, 5, 6) val setThree = setOne union setTwo println(setThree)
What will be the output?
val setOne = setOf(1, 2, 3, 4) val setTwo = setOf(3, 4, 5, 6) val setThree = setOne subtract setTwo println(setThree)
What will be the output?
val setOne = setOf(1, 2, 3, 4) val setTwo = setOf(3, 4, 5, 6) val setThree = setOne intersect setTwo println(setThree)
What will be the output?
val someSet = emptySet() val x = someSet.average() println(x * 2)
Get 3 Free Ebooks and a weekly dose of backend knowledge.
To make Codersee work, we log user data. By using our site, you agree to our Privacy Policy and Terms of Use.