1. Which code snippet correctly shows a for loop using a range to display "1 2 3 4 5 6"?
2. Which snippet correctly shows setting the variable max to whichever variable holds the greatest value, a or b, using idiomatic Kotlin?
3. Which lifecycle method should you override to pause the simulation when the app is not on the screen?
4. Your function is passed by a parameter obj of type Any. Which code snippet shows a way to retrieve the original type of obj, including package information?
5. Which function changes the value of the element at the current iterator location?
6. The Kotlin .. operator can be written as which function?
7. How can you create a variable with the floating number 2.8?
8. How can you create a range of numbers between 5 and 15 in Kotlin?
9. How to access the elements of an array in Kotlin?
10. The actual function for getting the string length in Kotlin language is?
Read More Section(Kotlin Program)
Each Section contains maximum 100 MCQs question on Kotlin Program. To get more questions visit other sections.
