4 ms·
Kotlin (which has very smooth interoperability with Java) makes it pretty easy: mapOf("a" to 1, "b" to 2) ...where "to" is actually an infix extension funct
by ptx 3y ago
Kotlin (which has very smooth interoperability with Java) makes it pretty easy:
mapOf("a" to 1, "b" to 2)
...where "to" is actually an infix extension function that creates a Pair object, so there is no special syntax for maps.