Skip to content

Instantly share code, notes, and snippets.

@CoderJava
Created October 1, 2018 13:30
Show Gist options
  • Select an option

  • Save CoderJava/867ace9617b2ee1245496c1559dbbb85 to your computer and use it in GitHub Desktop.

Select an option

Save CoderJava/867ace9617b2ee1245496c1559dbbb85 to your computer and use it in GitHub Desktop.
Create Operator Rx
import io.reactivex.Observable;
import io.reactivex.ObservableOnSubscribe;
public class RxOperatorCreate {
public static void main(String[] args) {
Observable
.create((ObservableOnSubscribe<String>) emitter -> {
emitter.onNext("Yudi Setiawan");
emitter.onComplete();
})
.subscribe(System.out::println);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment