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

9/15

Page

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

Functions in Kotlin are created with the following keyword?

Select an option to see the answer and solution.

What is the default return type of any functions defined in Kotlin?

Select an option to see the answer and solution.

The 'when' statement in Kotlin is similar to which statement in other programming languages?

Select an option to see the answer and solution.

Which keyword is used to indicate that a class can be subclassed?

Select an option to see the answer and solution.

What does the lateinit keyword in a variable declaration indicate in Kotlin code?

Select an option to see the answer and solution.

Which Gradle configuration indicates the most recent API level your app has been tested with?

Select an option to see the answer and solution.

Which of the following accessibility tools comes built in with most Android devices?

Select an option to see the answer and solution.

A View can contain any number of View or ViewGroup as its children. True or false?

Select an option to see the answer and solution.

Which of the following visibility attribute values, if set on a view, makes it so the view is hidden and does not take up any space in the layout?

Select an option to see the answer and solution.

Which one of the following statements is true about Button views?

Select an option to see the answer and solution.

In a ConstraintLayout, which of the following choices describes the constraints needed to keep a view in place during runtime?

Select an option to see the answer and solution.

Which of the following constraint types expands a view only as much as needed to fit its contents?

Select an option to see the answer and solution.

Which of the following is not a reason for minimizing calls to findViewById()?

Select an option to see the answer and solution.

How do you enable your project to use navigation components?

Select an option to see the answer and solution.

Where are the possible navigation routes through your app defined?

Select an option to see the answer and solution.

Where do you set the ID of a fragment to be used in navigation?

Select an option to see the answer and solution.

Where do you define the items for a menu?

Select an option to see the answer and solution.

Your app contains a physics simulation that requires heavy computation to display. Then the user gets a phone call. Which of the following is true?

Select an option to see the answer and solution.

To make a class lifecycle-aware through the Android lifecycle library, which interface should the class implement?

Select an option to see the answer and solution.

Under which circumstances does the onCreate() method in your activity receive a Bundle with data in it (that is, the Bundle is not null)?

Select an option to see the answer and solution.