What is the difference between flatmap and switchmap in RxJava?

According to the documentation ( http://reactivex.io/documentation/operators/flatmap.html ) the switchMap is like the flatMap, but it will only emit items from the new observable until a new event is emitted from the source observable. The marble diagram shows it well. Notice the difference in the diagrams: In switchMap the second original emission (green marble) does not … Read more