29 Oktober 2022

Android Basics with Compose

 

 

  1. The following code will print "Divisible by 5" if number is equal to 25.

if (number % 10 == 0) {
  println("Divisible by 10")
} else if (number == 5) {
  println("Divisible by 5")
}

.

false

  1. Which of the following conditions are satisfied when x = 5?

Choose as many answers as you see fit.

x == 5

Correct!

x in 1..5

Correct!

x is Int

Correct!

  1. Which is not a basic concept of object-oriented programming

Readability

  1. Which are the four visibility modifiers in Kotlin?

private, protected, public, internal

public, protected, static, internal

  1. The ___ keyword is used to call a method from the parent class.

super

Correct!

  1. A(n) ___ defines properties or methods that a class needs to implement.

Interface

  1. Which of the following is best represented by a nullable type?

An optional profile picture.

A unique ID given to every user.

  1. The ___ operator allows you to call a method only if the object is non-null.

?.

  1. Which is not true of functions in Kotlin?

A function can be changed to another data type, and vice versa.

  1. A function literal is another name for a ___

Lambda expression

Function reference

 

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