how to create a (Mutable)Collection<String!>...
# announcements
i
how to create a (Mutable)Collection<String!> value?
Copy code
String[] topics = new String[]{"demo-topic"};
consumer.subscribe(Arrays.asList(topics));
how to turn it to kotlin?
z
Copy code
val topics = listOf("demo-topic")
consumer.subscribe(topics)
That should be what you want
j
if you'd like a mutable list, you can use
mutableListOf("demo-topic")