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.

  • val is used for read-only (immutable) variables.
  • var is 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