Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


State the differences between val and var?



State the differences between val and var?..

Answer / Arpit Kumar Singh

{"val": "It is a read-only property, and its value cannot be changed after it has been initialized. It's used for declaring constants or immutable values.", "var": "It can be reassigned multiple times after initialization. It's used for declaring mutable properties."}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

Define Kotlin Programming Language?

1 Answers  


How do you differentiate var and val in Kotin?

1 Answers  


Can we create uninitialized array in kotlin?

1 Answers  


What are the different types of constructors in Kotlin?

1 Answers  


What is the difference between object { } block and companion object { } code block in Kotlin?

0 Answers  


Who created Kotlin programming language and when?

1 Answers  


Name the extension methods Kotlin provides to java.io.File?

1 Answers  


What is the use of rangeTo() function?

1 Answers  


What is the difference between declaration variable using val or var in kotlin?

1 Answers  


Explain Higher-Order Functions?

0 Answers  


How do you declare ranges operator in kotlin?

1 Answers  


Define enum in Kotlin?

1 Answers  


Categories