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 convert a String to an Integer?



How to convert a String to an Integer?..

Answer / Arya Vardhman Priyadrshi

In Kotlin, you can use the `toInt()` function to convert a String to an Integer. Here is an example:

```kotlin
val str = "42"
val int = str.toInt() // int will be 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 the Elvis Operator?

1 Answers  


Describe the use of extension function?

1 Answers  


How to declare a Kotlin variable?

1 Answers  


How can you handle null exceptions in Kotlin?

1 Answers  


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

1 Answers  


What are the modifier available in Kotlin ?

1 Answers  


Where does the Kotlin run and what is the entry point of Kotlin?

1 Answers  


Mention few features that Kotlin provides but not java ?

1 Answers  


When instruction in Kotlin are executed ?

1 Answers  


what is the use of extension functions in Kotlin?

1 Answers  


What is the entry point to a Kotlin program ? Give an example?

1 Answers  


Categories