Quiz

Complete this quiz to test your understanding of error handling.

We'll cover the following...
Technical Quiz
1.

What is the output of the code below?

Observable<Integer> observable =
         Observable.range(0, 10).flatMap(i -> {
            return (i == 3)
                ? Observable.error(new Exception("An error occurred"))
                : Observable.just(i);
        });
        observable.subscribe(i -> {
        }, throwable -> {
            System.out.println("onError(): " + throwable.getMessage());
        }); 
A.

3

B.

3
onError(): An error occurred.

C.

0
1
2

D.

onError(): An error occurred.


1 / 5