Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 18, 2018 17:53
Show Gist options
  • Save anitaa1990/1bdcc2c1921dd3e48f3b9976571cca7c to your computer and use it in GitHub Desktop.
Save anitaa1990/1bdcc2c1921dd3e48f3b9976571cca7c to your computer and use it in GitHub Desktop.
Observable.just(1, 2, 3, 4, 5, 6)
.elementAt(1)
.subscribe(new MaybeObserver<Integer>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(Integer integer) {
System.out.println("onNext: " + 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