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...


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



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

Answer / Gaurav Aggarwal

{"val": "val is a constant value that cannot be reassigned once it has been initialized.", "var": "var can be reassigned multiple times after initialization."}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

Does Kotlin have the static keyword? How to create static methods in Kotlin?

1 Answers  


How do you migrate the code from Java to Kotlin ?

1 Answers  


How to declare volatile variable ?

1 Answers  


State the differences between val and var?

1 Answers  


How to convert a String to an Int in Kotlin?

1 Answers  


How do you declare a variable in kotlin?

1 Answers  


How can data class be used in Kotlin?

1 Answers  


List the Basic data types of Kotlin?

1 Answers  


Give a syntax for declaring a variable as volatile in Kotlin?

1 Answers  


Define step() function in Kotlin?

1 Answers  


Why developers can prefer kotlin over java?

1 Answers  


Explain Higher-Order Functions?

0 Answers  


Categories