Created
October 1, 2018 13:30
-
-
Save CoderJava/867ace9617b2ee1245496c1559dbbb85 to your computer and use it in GitHub Desktop.
Create Operator Rx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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