val pair: Pair<String, Int> = Pair("Hello", 42) val firstElement = pair.first // "Hello" val secondElement = pair.second // 42 println(pair) // Hello, 42
val triple: Triple<String, Int, Double> = Triple("Kotlin", 42, 3.14) val firstElement = triple.first // "Kotlin" val secondElement = triple.second // 42 val thirdElement = triple.third // 3.14
[TIL-230311]