-
-
Save SODA1127/ace38d76ad15897724a4c14d40d23daf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args: Array<String>) { | |
val observable: Observable<String> = listOf("String 1","String 2","String 3","String 4").toObservable()//1 | |
observable.subscribe({//2 | |
println("Received $it") | |
},{ | |
println("Error ${it.message}") | |
},{ | |
println("Done") | |
}) | |
observable.subscribe({//3 | |
println("Received $it") | |
},{ | |
println("Error ${it.message}") | |
},{ | |
println("Done") | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment