Open Ansh1234 opened 6 years ago
`fun main() { Observable.just(returnInt()) }
fun returnInt() : Int { println("inside return block") return 2; }`
Even without subscribing to the Observable.just(), it prints the statement, which means it is a hot observable and not a cold observable.
Observable.just is a cold observable, because the data is produced inside the observable and closed.
`fun main() { Observable.just(returnInt()) }
fun returnInt() : Int { println("inside return block") return 2; }`
Even without subscribing to the Observable.just(), it prints the statement, which means it is a hot observable and not a cold observable.