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 can you declare a variable in Kotlin?



How can you declare a variable in Kotlin?..

Answer / Ankit Desh Pandey

In Kotlin, you can declare a variable by using the `var` keyword for mutable variables or the `val` keyword for immutable variables. For example: `var myVar = 5` or `val myVal = 10`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

How can you declare a variable in Kotlin?

1 Answers  


What is the use of abstraction in Kotlin?

1 Answers  


What is the difference between inline and infix functions? Give an example of each.

1 Answers  


What is the equivalent of switch expression in Kotlin? How does it differ from switch?

1 Answers  


What is the difference between var and val ?

1 Answers  


How to declare a variable in kotlin?

1 Answers  


What is Range in Kotlin?

1 Answers  


Describe the use of extension function?

1 Answers  


Why you should switch to Kotlin from Java?

1 Answers  


What are the requirements of an infix function?

1 Answers  


What do you mean by kotlin string interpolation?

1 Answers  


Why is kotlin preferred over java?

1 Answers  


Categories