01st
Jun
Kotlin MCQ

Kotlin MCQ

  • Admin
  • 01st Jun, 2022
  • 909 Followers

Take Kotlin Quiz to Test Your Knowledge

Practice below the best Kotlin MCQ Questions, that checks your basic knowledge of Kotlin. This Kotlin MCQ Test contains around 20+ Multiple Choice Questions and Answers. Choose the right answers to every question to check your final preparation for your Exam or Interview. Apart from this, you can also download Kotlin MCQ PDF, completely free.

Kotlin MCQ Quiz

1) Kotlin is developed by?

  • A. Google
  • B.JetBrains
  • C.Microsoft
  • D.Adobe

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

  • A. Range
  • B.Sealed Class
  • C.Elvis Operator
  • D.Lambda function

3) Which file extension is used to save Kotlin files.

  • A. .java
  • B..kot
  • C..kt or .kts
  • D..andriod

4) All classes in Kotlin classes are by default?

  • A. public
  • B.final
  • C.sealed
  • D.abstract

5) What is correct way to create an arraylist in Kotlin?

  • A. val map = hashMapOf(1 to "one", 2 to "two", 3 to "three")
  • B.enum class Color {RED, GREEN, BLUE}
  • C.val list = arrayListOf(1, 2, 3)
  • D.val set = hashSetOf(1, 2, 3)
Download Free : Kotlin MCQ PDF

6) What is an immutable variable?

  • A. A variable that cannot change, read-only
  • B.A variable that can be changed
  • C.A variable used for string interpolation

7) Which of follwing targets currently not supported by Kotlin?

  • A. LLVM
  • B..NET CLR
  • C.Javascript

8) How to make a multi lined comment in Kotlin?

  • A. //
  • B./* */
  • C./ multi line comment /

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

  • A. str.length
  • B.length(str)
  • C.str.lengthOf

10) Which of the followings constructors are available in Kotlin?

  • A. Primary constructor
  • B.Secondary constructor
  • C.Both 1 & 2
  • D.None of the above

11) Does Kotlin works only for Java?

  • A. Yes
  • B.No

12) Is Kotlin compatible with the Java programming language?

  • A. Yes
  • B.No

13) Which of the following extension methods are used in Kotlin?

  • A. Read texts () & Headlines ()
  • B.Buffer reader ()
  • C.Read each line ()
  • D.All of the above

14) There are two types of constructors in Kotlin which are-

  • A. Primary & Secondary constructor
  • B.Default & No-arg constructor
  • C.Parameterized & constant Constructor
  • D.None of the above

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

  • A. Numbers
  • B.Strings
  • C.Arrays
  • D.Lists

16) Can we execute Kotlin Code Without Jvm?

  • A. Yes
  • B.No

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

  • A. Range
  • B.Elvis Operator
  • C.Sealed Class
  • D.Lambda function

18) Does Kotlin have the static keyword?

  • A. Yes
  • B.No

19) Is new a keyword in Kotlin?

  • A. Yes
  • B.No

20) Kotlin was developed under the .......... license.

  • A. Apache 1.0
  • B.Apache 2.0
  • C.Apache 1.1
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jun
Unix MCQ
01st
May
MS Excel MCQ