.zip() is an operation that combines items from two Observables into one by taking an item from each of the Observables and then producing a new value. It means that it waits for both of the Observables to produce a value before the flow continues.
This is useful in occasions where two values are produced independently but later (downstream), they are both consumed at the same time.
Let's see an example of that:
Observable.zip( Observable.just("One", "Two", "Three"), Observable.interval(1, TimeUnit.SECONDS), (number, interval) -> number + "-" + interval) .subscribe(e -> log(e));
The first argument of .zip() is this:
Observable.just("One", "Two", "Three")
This is just a regular Observable that will produce three items. The second argument ...