Hello guys, can please someone explain me why usi...
# rx
g
Hello guys, can please someone explain me why using rxJava2 I have next situation: Using java Observable.fromArray(new String[]{"one", "two", “three”}) emit strings one by one Using kotlin Observable.fromArray(arrayOf("one", "two", “three”)) emit one element - array of strings
m
You should avoid using
arrayOf
and
new String[] {}
in both cases.
fromArray
takes varargs, so just call it directly with
Observable.fromArray("one", "two", "three")
in both languages.