Skip to content

Instantly share code, notes, and snippets.

@CoderJava
Created October 1, 2018 16:05
Show Gist options
  • Select an option

  • Save CoderJava/ba1b6a623df80a907b16606ef5cc43d4 to your computer and use it in GitHub Desktop.

Select an option

Save CoderJava/ba1b6a623df80a907b16606ef5cc43d4 to your computer and use it in GitHub Desktop.
Transforming Operator FlatMap RxJava
public class RxTransformingOperatorFlatMap {
public static void main(String[] args) {
String[] names = new String[]{"Yudi Setiawan", "Rosalia", "Harli Lopies", "Fitriani"};
Observable.just(names)
.flatMap((Function<String[], ObservableSource<String>>) Observable::fromArray)
.subscribe(System.out::println);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment