Skip to content

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.

License

Notifications You must be signed in to change notification settings

VaibhavMojidra/Kotlin---Demo-Difference-Between-Var-And-Val

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kotlin Demo Difference Between Var And Val

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.


Vaibhav Mojidra - 1.jpeg

Vaibhav Mojidra - 2.jpeg

Vaibhav Mojidra - 3.jpeg

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages