[RxJAVA] Chap01. Reactive Programming
2023. 12. 27. 15:22ใProgramming/JAVA
๐ Reactive Programming
๐ Source Code
package reactivejava;
import io.reactivex.Observable;
public class FirstExample {
public void emit() {
// Observable class = ๋ฐ์ดํฐ์ ๋ณํ๊ฐ ๋ฐ์ํ๋ data source
Observable.just("Hello", "RxJava2!!") // just - ๊ฐ์ฅ ๋จ์ํ observable ์ ์ธ ๋ฐฉ์
.subscribe(System.out::println); // subscribe -> Observable์ ๊ตฌ๋
}
public static void main(String args[]) {
FirstExample demo = new FirstExample();
demo.emit();
// ์์ ์ ์ํ emit ํจ์ ํธ์ถ
}
}
'Programming > JAVA' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Broccoli Board Website ์์ฑ (0) | 2024.01.06 |
---|---|
Broccoli Board Website ๋ง๋ค๊ธฐ (1) | 2024.01.04 |