what is the difference var and val in kotlin
variables defined with var are mutable(Read and Write)
variables defined with val are immutable(Read only)
what is the difference var and val in kotlin
variables defined with var are mutable(Read and Write)
variables defined with val are immutable(Read only)
var and val in kotlin
val and var both are used to declare a variable. var is like general variable and it's known as a mutable variable in kotlin and can be assigned multiple times. val is like Final variable and it's known as immutable in kotlin and can be initialized only single time.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us