Answers for "kotlin multiple return string"

0

return two values kotlin

fun main() {
    val (name, _, comments) = getFeedback();
    System.out.println("name :" + name)
    System.out.println("comments :" + comments)
                       
}
Posted by: Guest on October-23-2021
0

return two values kotlin

fun main() {
    val numbersMap = mapOf("one" to 1, "two" to 2, "three" to 3)
    for ((key, value) in numbersMap) {
   
        System.out.println("key :" + key)
        System.out.println("value :" + value)
    }  
}
Posted by: Guest on October-23-2021

Browse Popular Code Answers by Language