Skip to content

Instantly share code, notes, and snippets.

@greghelton
Last active April 25, 2016 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghelton/212d543926d4aaeb585bebea72c19bf4 to your computer and use it in GitHub Desktop.
Save greghelton/212d543926d4aaeb585bebea72c19bf4 to your computer and use it in GitHub Desktop.
package com.reactive.chapter3;
import rx.Observable;
public class SimpleObservable {
public SimpleObservable go() {
Observable<Integer> arrayObservable = Observable.from(new Integer[] {3, 5, 8});
arrayObservable.subscribe(System.out::println);
return this;
}
public SimpleObservable go2() {
Observable.just('j', 'a', 'v', 'a').subscribe(System.out::println);
return this;
}
public static void main(String[] args) {
new SimpleObservable().go().go2();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment