Post

KotlinKotlin

s
sri kanth

Posted on 27th February 2024|35 views

0
votes

Kotlin Val Vs Var

Explain the difference between Val and Var in kotlin?

Answers
P
Surya kumar

Posted on 27th February 2024

  • Both Val and Var in kotlin are utilized to declare a variable, Var is a general variable, and we can assign Var the various number of times and Var also acknowledged as the mutable variable. 
  • Val is acknowledged as an immutable variable because it is constant and we cannot assign it a various number of times.

If you want to learn more about this amazing language, Enroll Now: Kotlin Training

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos