#36 rxjava: ex02

This commit is contained in:
haerong22
2023-04-14 03:25:34 +09:00
parent 4e152aab04
commit f78db7e5c9
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package org.example.ex02;
import io.reactivex.rxjava3.core.Observable;
public class MarbleExample01 {
public static void main(String[] args) {
Observable.just(1, 25, 9, 15, 7, 30)
.filter(x -> x > 10)
.subscribe(System.out::println);
}
}

View File

@@ -0,0 +1,12 @@
package org.example.ex02;
import io.reactivex.rxjava3.core.Observable;
public class MarbleExample02 {
public static void main(String[] args) {
Observable<Integer> observable = Observable.just(1, 25, 9, 15, 7, 30);
observable.subscribe(System.out::println);
}
}