More Kotlin fundamentals
1. Which of the following is a valid way to define a data class in Kotlin?
2.
When using a
sealed class, all direct subclasses must be in the same package.
Correct!
3.
When using generics,
the generic data type goes inside ___.
4.
Correct!
5.
To create a list
object that has the ability to change its size, you would call ___.
Correct!
6.
Choose as many answers as you see fit.
Partially Correct.
Correct!
Correct!
7.
Given the
following line of code, which of the following commands will print Blue? (Hint: If you are not sure, try running the code in the
Kotlin Playground.)
= listOf("Red", "Green", "Blue")
Choose as many answers as
you see fit.
Partially Correct.
Correct!
Correct!
8.
The programming
concept of a class that has only one instance is called a ___.
Correct!
9.
Which of the
following statements is true regarding sets and maps?
10.
If you have a
variable named records, which is a collection, to determine the number of items
it contains, you can call ___.
Tidak ada komentar:
Posting Komentar