Created
August 19, 2018 11:46
-
-
Save anitaa1990/1e071e5c2d733d668ffd994ca47b476e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable<Integer> observable = Observable | |
.just(1, 2, 3, 4, 5); | |
MathObservable | |
.sumInt(observable) | |
.subscribe(new Observer<Integer>() { | |
@Override | |
public void onSubscribe(Disposable d) { | |
} | |
@Override | |
public void onNext(Integer integer) { | |
System.out.println("Sum: " + integer); | |
} | |
@Override | |
public void onError(Throwable e) { | |
} | |
@Override | |
public void onComplete() { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment