Loading...
QUIZ

Certification Test

 
Que No. 1 ) Which Kotlin keyword is used to create an instance of a class?

A.) object
B.) create
C.) new
D.) instance


Que No. 2 ) What is the primary purpose of the runBlocking function in Kotlin?

A.) To define a class
B.) To create a new thread
C.) To start a coroutine and block the current thread until it completes
D.) To declare a variable


Que No. 3 ) In Kotlin, which collection type represents an ordered list of elements?

A.) Set
B.) Map
C.) Array
D.) List


Que No. 4 ) What is the Kotlin standard library function for iterating over elements in a collection?

A.) forEach
B.) for
C.) loop
D.) iterate


Que No. 5 ) What is the Kotlin with function used for?

A.) Creating a new object
B.) Scoping a series of operations on an object
C.) Defining a class
D.) Handling exceptions


Que No. 6 ) In Kotlin, what is a lambda expression?

A.) A way to declare a class
B.) A way to define a function
C.) A way to create a new object
D.) A way to represent a block of code as a value


Que No. 7 ) How do you declare a higher-order function in Kotlin?

A.) Using the higherOrder keyword
B.) Using the fun keyword
C.) By specifying a function as a parameter or return type
D.) By using the return keyword


Que No. 8 ) What is the Kotlin filter function used for?

A.) Sorting elements in a collection
B.) Filtering elements based on a predicate condition
C.) Concatenating two collections
D.) Transforming elements in a collection


Que No. 9 ) What is the Kotlin map function used for?

A.) Filtering elements in a collection
B.) Sorting elements in a collection
C.) Transforming elements in a collection
D.) Concatenating two collections


Que No. 10 ) In Kotlin, what is the purpose of the infix keyword?

A.) To declare an infix function
B.) To create an interface
C.) To define a class
D.) To specify a package