Kotlin example of creating pair using the constructor
:
fun main() {
// creating a new instance of the Pair
val (a, b) = Pair(10, 20)
// Printing the values
println(a)
println(b)
}
Output:
10
20
