What does the following code output? val phrase = “pizza” println(“Today’s phrase is \”${phrase.uppercase()}\””)
This is an example of a Kotlin for-loop. for (i: Int = 0; i…
This is an example of a Kotlin for-loop. for (i: Int = 0; i < 10; i++) { println(i) }
What is the purpose of defining resources such as images, st…
What is the purpose of defining resources such as images, strings, and colors in dedicated resource files rather than directly in your Kotlin code?
What does this output? var cars = 10 cars += 5 println(“Ther…
What does this output? var cars = 10 cars += 5 println(“There are $cars cars”)
A Kotlin function displays a message on the screen but does…
A Kotlin function displays a message on the screen but does not return any value. Which of the following statements is true about this function’s return type?
A developer is building an Android app and needs to set the…
A developer is building an Android app and needs to set the font size for a text element. Which unit of measurement should they use, and why?
Kotlin is _____________ compatible with Java.
Kotlin is _____________ compatible with Java.
Which item calls this function correctly? fun reserveHotel(c…
Which item calls this function correctly? fun reserveHotel(city: String, nights: Int, breakfast: Boolean ): String { … }
A developer has written the following function in their Andr…
A developer has written the following function in their Android app. What must be added so that the Compose compiler recognizes this function’s purpose is to render a text element as part of the app’s UI? fun WelcomeBanner(username: String) { Text(text = “Welcome back, $username!”) }
Which of the following correctly creates a Text composable w…
Which of the following correctly creates a Text composable with a font size of 24, a padding of 24, and the text “Hello”?