File tree 4 files changed +71
-0
lines changed
be_scratch/ BeScratch/src/main/java/com/yen/dev
4 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ # RX Java
2
+
3
+ ## Ref
4
+ - https://www.youtube.com/watch?v=7mbjhNCWqvs&list=PLZ3FH0lcV0117kiek3g-qiQDkO4ezy_Ro
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <groupId >com.yen</groupId >
8
+ <artifactId >RxJava</artifactId >
9
+ <version >1.0-SNAPSHOT</version >
10
+
11
+ <properties >
12
+ <maven .compiler.source>11</maven .compiler.source>
13
+ <maven .compiler.target>11</maven .compiler.target>
14
+ </properties >
15
+
16
+ <dependencies >
17
+
18
+ <!--
19
+ rxjava
20
+ https://mvnrepository.com/artifact/io.reactivex/rxjava
21
+ -->
22
+ <dependency >
23
+ <groupId >io.reactivex</groupId >
24
+ <artifactId >rxjava</artifactId >
25
+ <version >1.3.8</version >
26
+ </dependency >
27
+
28
+ </dependencies >
29
+
30
+ </project >
Original file line number Diff line number Diff line change
1
+ package com .yen ;
2
+
3
+ import rx .Observable ;
4
+
5
+ public class Main {
6
+ public static void main (String [] args ) {
7
+
8
+ System .out .println ("Hello world!" );
9
+
10
+ /** part 1
11
+ *
12
+ * https://youtu.be/7mbjhNCWqvs?si=nuGVikk2eSXVRqUE
13
+ */
14
+ Observable <String > observable = Observable .create (emitter -> {
15
+ emitter .onNext ("click on 1" );
16
+ emitter .onNext ("click on 2" );
17
+ emitter .onNext ("click on 3" );
18
+ });
19
+
20
+ observable .subscribe (item -> {
21
+ System .out .println (item );
22
+ }, throwable -> {
23
+ System .out .println (throwable .getMessage ());
24
+ }, () -> {
25
+ System .out .println ("op complete !" );
26
+ });
27
+
28
+ }
29
+
30
+ }
Original file line number Diff line number Diff line change
1
+ package com .yen .dev ;
2
+
3
+ public class test1 {
4
+ public static void main (String [] args ) {
5
+ System .out .println (123 );
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments