Kotlin fundamentals

  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")
    }
  2. Which of the following conditions are satisfied when x = 5?

    Choose as many answers as you see fit.

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

  4. Which are the four visibility modifiers in Kotlin?

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

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

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

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

  9. Which is not true of functions in Kotlin?

  10. A function literal is another name for a ___