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

What is a const? How does it differ from a val?

1 Answers  


Does Kotlin support primitive Datatypes?

1 Answers  


What are High-Level Functions in Kotlin?

1 Answers  


Which method is used to get array last index?

1 Answers  


How to write multiline string in kotlin?

1 Answers  


Who is the developer of Kotlin?

1 Answers  


Who created Kotlin programming language and when?

1 Answers  


How to declare a variable in kotlin?

1 Answers  


Give me name of the extension methods Kotlin provides to java.io.File

1 Answers  


What are the requirements of an infix function?

1 Answers  


Define Kotlin Programming Language?

1 Answers  


What is Kotlin?

1 Answers  


Categories