A Subject is a consumer and an Observable at the same time. It means that it can listen for values from other Observables (subscribe to Observable), and it can produce values for other subscribers. So, for example, the following code is valid with a Subject:
Subject<String> subject = ...;subject.subscribe(v -> log(v));Observable.just("1") .subscribe(subject);
We can see that, on the second line, we were able to subscribe to the subject successfully, and it means that it acts as Observable here. On the third line, we made the subject listen to the changes that this other Observable will produce.
As we will see later, this can come in extremely handy when we want to connect individual Observables without creating direct dependencies ...