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


How do you declare a variable in kotlin?



How do you declare a variable in kotlin?..

Answer / Surya Kant Srivastav

To declare a variable in Kotlin, you should use the 'var' keyword for mutable variables and 'val' for immutable ones. For example: var myVariable = 0 or val MY_CONSTANT = 42.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

Define high order functions in Kotlin?

1 Answers  


What is Ranges operator in Kotlin?

1 Answers  


List some of the key modifiers in kotlin?

1 Answers  


How do you declare a variable as volatile in Kotlin ?

1 Answers  


How to make a class data class ?

1 Answers  


What is the extension of Kotlin file?

1 Answers  


How are Primary Constructors different from Secondary Constructors ?

1 Answers  


Is there any disadvantage of Kotlin ?

1 Answers  


What kinds of programming does Kotlin support ?

1 Answers  


What is Range in Kotlin?

1 Answers  


What is the latest version of kotlin?

0 Answers  


Why is Kotlin interoperable with Java?

1 Answers  


Categories