Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 17, 2018 17:00
Show Gist options
  • Save anitaa1990/fdf0b8cd826e7a67343bac23f53d95f6 to your computer and use it in GitHub Desktop.
Save anitaa1990/fdf0b8cd826e7a67343bac23f53d95f6 to your computer and use it in GitHub Desktop.
Observable.fromArray(new String[]{"A", "B", "C", "D", "E", "F"})
.subscribe(new Observer<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(String string) {
System.out.println("onNext: " + string);
}
@Override
public void onError(Throwable e) {
System.out.println("onError: " + e.getMessage());
}
@Override
public void onComplete() {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment