Kotlin Multiple Choice Questions And Answers

Kotlin Multiple Choice Questions And Answers: Kotlin MCQs

Kotlin language is becoming popular day by day. Many developers are using Kotlin to develop Android applications. In this section, we try to cover up basic and advanced level Kotlin multiple-choice questions. Kotlin MCQs for all levels and this will help you in learning and understanding the Kotlin language. So here is Kotlin Multiple Choice Questions And Answers.


Kotlin Multiple Choice Questions


1- Who developed Kotlin?



(C) JetBrains

(D) Microsoft


2- Which extension is responsible to save Kotlin files ??

(A) .kot

(B) .android

(C) .src

(D) .kt or .kts


3- How to do a multi-line comment in Kotlin language ??

(A) //

(B) \\

(C) /* */

(D) None of the above


4- Kotlin only works for supporting Java language ??

(A) True 

(B) False


5- The two types of constructors in Kotlin are ??

(A) Primary and Secondary constructor  

(B) First and the second constructor

(C) Constant and Parameterized constructor

(D) None of these


6- Does Kotlin use the “static” keyword ??

(A) Yes 

(B) No


7- What handles null exceptions in Kotlin ??

(A) Sealed classes

(B) Lambda functions

(C) The Kotlin extension

(D) Elvis operator


8- The correct function to get the length of a string in Kotlin language is ??

(A) str.length

(B) string(length)

(C) lengthof(str)

(D) None of these


9- Kotlin language name came from the “Koltin Island” of Russia ??

(A) True

(B) False


Kotlin Multiple Choice Questions And Answers


10- The function to print a line in Kotlin is ??

(A) Printline()

(B) println()

(C) print()

(D) option (b) and (c)


11- Under which license Kotlin was developed ??

(A) 1.1

(B) 1.5

(C) 2.0

(D) 2.1


12- In Kotlin, the default visibility modifier is ??

(A) sealed

(B) public

(C) protected

(D) private


13- Does Kotlin support OOPS and Procedural Programming ??

(A) Yes 

(B) No


14- What defines a sealed class in Kotlin ??

(A) Its another name for an abstract class

(B) It represents restricted class hierarchies

(C) It is used in every Kotlin program

(D) None of above


15- The default behavior of classes in Kotlin is ??

(A)  All classes are protected

(B) All classes are sealed

(C) All classes are final

(D) All classes are public


16- Does Kotlin allow macros ??

(A) False

(B) True


17- The functions in Kotlin can be divided into how many types ??

(A) 5

(B) 4

(C) 3

(D) 2


18- The Kotlin language is backward-compatible ??

(A) False

(B) True


19- What are the most important benefit/benefits of using Kotlin language ??

(A) It is is a functional language and based on Java Virtual Machine 

(B) It is an expressive language that makes code readable and understandable. 

(C) It is an expressive language that makes code readable and understandable

(D) All of the above


Kotlin Multiple Choice Questions And Answers


20- Which are the basic data types in Kotlin ?? 

(A) Arrays and Booleans

(B) Characters

(C) Strings and Numbers

(D) All of these


21- Which of these features are available in Kotlin but not in the Java language ??

(A) Operator overloading

(B) Coroutines and Null safety

(C) Range expressions

(D) All of the above


22- The Kotlin code can be executed without JVM ??

(A) False 

(B) True


23- Kotlin is really better than Java ??

(A) No, Java is better

(B) Both have similar functionalities

(C) Yes, Kotlin is really better

(D) Some features in Java are better than Kotlin


24- val short for Value, a constant which cannot be changed once assigned ??

(A) It can be changed but once only

(B) It can be changed

(C) val cannot be changed after its assigned

(D) Both (a) and (b)