Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 19, 2018 11:30
Show Gist options
  • Save anitaa1990/0c324928bd807030979ded1efbee0897 to your computer and use it in GitHub Desktop.
Save anitaa1990/0c324928bd807030979ded1efbee0897 to your computer and use it in GitHub Desktop.
Observable.just(1, 2, 3, 4, 5)
.count()
.subscribe(new SingleObserver<Long>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(Long aLong) {
System.out.println("Count: " + aLong);
}
@Override
public void onError(Throwable e) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment