Vidyalelo
Computer Science · all questions

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

292

Questions

10/15

Page

Pick an option on a question to see the right answer and solution.

What does the !! operator do?

Select an option to see the answer and solution.

What is the syntax for calling a method in Kotlin?

Select an option to see the answer and solution.

What is the correct way to define a primary constructor in Kotlin?

Select an option to see the answer and solution.

Does Kotlin have primitive data types, such as int, long, float?

Select an option to see the answer and solution.

How do we throw an exception in Kotlin?

Select an option to see the answer and solution.

What does the data class not provide?

Select an option to see the answer and solution.

What is the entry point for a Kotlin application?

Select an option to see the answer and solution.

The function to print a line in Kotlin is?

Select an option to see the answer and solution.

Which of the following separates function parameters

Select an option to see the answer and solution.

Which lifecycle method is called to make an activity visible?

Select an option to see the answer and solution.

Which lifecycle method is called to give an activity focus?

Select an option to see the answer and solution.

What is the key difference between Iterable<T> and Sequence<T> in Kotlin?

Select an option to see the answer and solution.

Which function is used to iterate over a collection in Kotlin?

Select an option to see the answer and solution.

Which of these functions can transform a list in Kotlin?

Select an option to see the answer and solution.

How do you create an empty list in Kotlin?

Select an option to see the answer and solution.

What is a correct syntax to output "Hello World" in Kotlin?

Select an option to see the answer and solution.

What is the output of the following code: println(5 > 3 && 5 < 10)

Select an option to see the answer and solution.

You would like to know each time a class property is updated. Which code snippet shows a built-in delegated property that can accomplish this?

Select an option to see the answer and solution.

How do you start writing a for loop in Kotlin, to loop through arrays?

Select an option to see the answer and solution.

In Kotlin, code statements do not have to end with a . . . . . . . .

Select an option to see the answer and solution.