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 to declare a variable in kotlin?



How to declare a variable in kotlin?..

Answer / Dev Mani Rawat

{"declaration": "A variable is declared using the keyword 'var' or 'val', followed by its name, and then its type. The value can be assigned after the declaration on the same line, or separately on subsequent lines."}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

What are the modifiers that are available in kotlin?

1 Answers  


Does Kotlin support primitive Datatypes?

1 Answers  


Does Kotlin support both Explicit conversion and Implicit conversions?

1 Answers  


What are the advantages and disadvantages of Kotlin?

1 Answers  


What is the use of rangeTo() function?

1 Answers  


How does string interpolation work in Kotlin? Explain with a code snippet?

1 Answers  


What is the default visibility modifier and also list the different types of modifiers?

1 Answers  


In kotlin, can we create an empty array?

1 Answers  


What is the difference between var and val ?

1 Answers  


What is the use of any() function?

1 Answers  


Does Kotlin allow macros?

1 Answers  


What is the use of function extension ?

1 Answers  


Categories