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 variables in Kotlin?



How to declare variables in Kotlin?..

Answer / Avdesh Tripathi

In Kotlin, you can declare variables using the `var` or `val` keywords. Here's an example:n```kotlinnval constant: Int = 42nvar mutableVariable: String = "Hello World"nmutableVariable = "New Message"```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

What is lateinit modifier?

0 Answers  


How to declare a Kotlin variable?

1 Answers  


Explain functions in kotlin?

1 Answers  


How to handle null exceptions in Kotlin programming?

1 Answers  


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

1 Answers  


State the differences between val and var?

1 Answers  


What are the data classes in Kotlin? How are they defined?

1 Answers  


Is there any disadvantage of Kotlin ?

1 Answers  


Why is Kotlin interoperable with Java?

1 Answers  


what is the use of extension functions in Kotlin?

1 Answers  


Why you should switch to Kotlin from Java?

1 Answers  


What is the difference between val and var?

1 Answers  


Categories