Create Observable using fromArray method in RxJava

Constructs a sequence from a pre-existing source or generator type.
Signals the elements of the given array and then completes the sequence.

String[] array = new String[10];
for (int i = 0; i < array.length; i++) {
    array[i] = String.valueOf(i);
}

Observable<String> observable = Observable.fromArray(array);

observable.subscribe(s -> {
    System.out.println(s);
});

References
https://github.com/ReactiveX/RxJava/wiki/Creating-Observables#fromarray