Kotlin program to retrieve the values of Pair using properties

bookmark

fun main() {
    // creating a new instance of the Pair
    var numbers = Pair(10, 20)

    // Printing the values
    println(numbers.first)
    println(numbers.second)
}

 


Output:

10
20