Skip to content
#

var-vs-val

Here is 1 public repository matching this topic...

In Kotlin, var and val are used to declare variables. The main difference between them is that var declares a mutable variable, which means its value can be changed after it is initialized, while val declares an immutable variable, which means its value cannot be changed after it is initialized.

  • Updated Apr 29, 2023
  • Kotlin

Improve this page

Add a description, image, and links to the var-vs-val topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the var-vs-val topic, visit your repo's landing page and select "manage topics."

Learn more