{

Learn free kotlin tutorials


Convert String to Long in Kotlin with example

December 1, 2022 ·  1 min read

This tutorial explains about multiple ways to convert String to Long and Long to String There are multiple ways we can convert String to Long type in kotlin. Convert String to Long value use valueOf method import java.lang.Long; fun main() { val value = Long.valueOf("11"); println(value); //11 println(value is kotlin.Long);// true } use toLong method toLong or toLongOrNull method takes string object and returns an long value....


Multiple ways to iterate Map in Kotlin with example

December 1, 2022 ·  2 min read

Map contains key and value pairs data structure. This tutorials explains multiple ways to iterate an Map in Kotlin with examples. Multiple ways to iterate Key and value pair in Kotlin there are multiple ways to iterate key and value pair in Kotlin. use for in loop map object in for loop iterated with each object, where each object contains key and value pairs. Key and value pairs are printed using $variable....


Subscribe
You'll get a notification every time a post gets published here.