[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