๐Ÿงช Kotlin (programming language) MCQ Quiz Hub

Kotlin MCQ Set 1

Choose a topic to test your knowledge and improve your Kotlin (programming language) skills

Kotlin is developed by?





โœ… Correct Answer: 2

Which of following is used to handle null exceptions in Kotlin?





โœ… Correct Answer: 3

Which file extension is used to save Kotlin files.





โœ… Correct Answer: 3

All classes in Kotlin classes are by default?





โœ… Correct Answer: 2

What is correct way to create an arraylist in Kotlin?





โœ… Correct Answer: 3

6. What is an immutable variable?





โœ… Correct Answer: 1

Which of follwing targets currently not supported by Kotlin?





โœ… Correct Answer: 2

How to make a multi lined comment in Kotlin?





โœ… Correct Answer: 3

9. How do you get the length of a string in Kotlin?





โœ… Correct Answer: 1

Which of the followings constructors are available in Kotlin?





โœ… Correct Answer: 3

Which of the following extension methods are used in Kotlin?





โœ… Correct Answer: 4

There are two types of constructors in Kotlin which are-





โœ… Correct Answer: 1

Which of the following is not the basic data types in Kotlin?





โœ… Correct Answer: 4

Which of following option is used to handle null exceptions in Kotlin?





โœ… Correct Answer: 2

Kotlin was developed under the .......... license.





โœ… Correct Answer: 2

You have created an array to hold three strings. When you run the code bellow, the compiler displays an error. Why does the code fail? val names = arrayOf(3) names[3]= "Delta"





โœ… Correct Answer: 1

If a class has one or more secondary constructors, what must each of them do?





โœ… Correct Answer: 3

When you can omit constructor keyword from the primary constructor?





โœ… Correct Answer: 4

How many different kinds of constructors are available for kotlin classes?





โœ… Correct Answer: 2