30 Oktober 2022

Android Basics with Compose

 

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.     

A(n) ___ class is useful when you have a fixed set of values.

Correct!

5.      To create a list object that has the ability to change its size, you would call ___.

Correct!

6.     

Which of the following are higher-order functions?

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.)

val colors = 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

#QUIZ Faktor bentuk

  Faktor bentuk Class ukuran jendela ditentukan oleh seluruh layar fisik untuk multitasking atau segmentasi lainnya. Benar Salah Class ukura...