fun <K : Comparable<K>, V> sortedMapOf(
    vararg pairs: Pair<K, V>
): SortedMap<K, V>

Platform and version requirements: JVM

Returns a new SortedMap with the specified contents, given as a list of pairs where the first value is the key and the second is the value.

import kotlin.test.*
import java.util.*

fun main(args: Array<String>) {
val map = sortedMapOf(Pair("c", 3), Pair("b", 2), Pair("d", 1))
println(map.keys) // [b, c, d]
println(map.values) // [2, 3, 1]