RxJava – Just vs From

The difference should be clearer when you look at the behaviour of each when you pass it an Iterable (for example a List):

Observable.just(someList) will give you 1 emission – a List.

Observable.from(someList) will give you N emissions – each item in the list.

The ability to pass multiple values to just is a convenience feature; the following are functionally the same:

Observable.just(1, 2, 3);
Observable.from(1, 2, 3);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)