Reputation: 3726
How to access methods such as listOf
, mapOf
and setOf
from Java.
I'm in a project that doesn't use Kotlin but we want to use the effectively read-only Kotlin collections. Why? Because even when using immutable lists in Java, they have mutator methods that will raise an error in runtime, and not during compilation.
Upvotes: 1
Views: 61