How can you check if a value is within a range in Kotlin?
Both 'in' operator and 'contains' method can be used
Using the 'in' operator
Using the 'contains' method
None of the above
What is a default argument in Kotlin?
An argument that is passed to a function by reference.
An argument that is automatically inferred by the compiler.
An argument that is provided a default value in the function signature.
An argument that is required to be passed when calling the function.
What is the default visibility modifier for classes and members in Kotlin?
protected
private
public
internal
Which of the following is NOT a characteristic of a Kotlin List?
Allows duplicate elements.
Maintains the order of elements.
Can store elements of different data types.
Provides indexed access to elements.
How do you define a property in Kotlin?
Using 'field' keyword
Using 'var' or 'val' keyword before the variable declaration
Using 'property' keyword
Properties are automatically generated from constructor parameters
Which keyword makes a variable immutable in Kotlin?
const
final
val
let
What is the output of listOf(1, 2, 2, 3).toSet() in Kotlin?
listOf(1, 2, 2, 3).toSet()
[1, 2, 3]
{1, 2, 2, 3}
[1, 2, 2, 3]
{1, 2, 3}
Which data type represents a whole number in Kotlin?
Int
String
Boolean
Float
What is the primary constructor in Kotlin?
Kotlin doesn't have constructors.
A constructor declared inside the class body.
A constructor declared using the 'constructor' keyword.
The constructor defined within the class header.
What is a field in Kotlin?
A constant value
A backing field for a property
A property declared inside a function
A static variable