#36 rxjava: ex02
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user