Navigate between screens

  1. Which of the following is false about collections and higher order functions in Kotlin?
  2. Given the following code, what is the result of oneWordCities[1]?
    val cities = listOf(“Jeddah”, “Bengaluru” “Shenzhen”, “Abu Dhabi”, “Mountain View”, “Tripoli”, “Bengaluru”, “Lima”, “Mandalay”, “Tripoli”)
    val oneWordCities = cities.toSet().toList().filter { !it.contains(“ “)}.sorted()
  3. Fill-in-the-blanks

    Enter one or more words to complete the sentence.

    A(n) ___ is a piece of data passed between activities when launching an intent.

  4. If you open an app, and then leave the app using the back button, in which order were the following activity lifecycle methods called?
  5. Which activity lifecycle method would be called if a dialog appears onscreen, partially obscuring an activity?
  6. Which of the following is true about the lifecycle of a single activity?

    Choose as many answers as you see fit.

  7. Which of the following is false about intents?
  8. An activity contains the following code in onCreate(). What will happen when this code is executed, if the intent property is null?
    val message = intent.extras?.getString("message"
  9. Which of the following tasks can be performed in onCreate()?

    Choose as many answers as you see fit.

  10. In which method should you handle what happens when a button in the app bar is pressed?