Which operator is used in Kotlin to declare a variable?
Computer Science
ScanSolve AI Answer
Answer
In Kotlin, the val and var keywords are used to declare variables.
valis used for read-only (immutable) variables.varis used for mutable variables.
Was this helpful?
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.
Got a different question?Ask your own question
More Computer Science Questions
QIn Kotlin, how do you declare a variable that cannot be reassigned after it is initialized?QIn Kotlin, how do you declare a variable whose value cannot be changed after initialization?QWhich of the following are correct Kotlin variable declarations? Select all that apply. kotlin //…QWhich of the following is a basic data type in Kotlin?QWhich Kotlin variable declarations are correct? Options: var age: Int? = 30, val name: String…