@@ -0,0 +1,1636 @@
+/**%0A * %0A */%0Apackage alokawi.rxjava.core;%0A%0Aimport org.reactivestreams.Subscriber;%0Aimport org.reactivestreams.Subscription;%0A%0Aimport io.reactivex.Flowable;%0Aimport io.reactivex.functions.Action;%0Aimport io.reactivex.functions.Consumer;%0A%0A/**%0A * @author alokkumar%0A *%0A */%0Apublic class SubscriberExample %7B%0A%0A%09/**%0A%09 * @param args%0A%09 */%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Flowable.fromArray(1, 2, 3, 4).subscribe(%0A%09%09        i -%3E System.out.printf(%22Entry %25d%5Cn%22, i),%0A%09%09        e -%3E System.err.printf(%22Failed to process: %25s%5Cn%22, e),%0A%09%09        () -%3E System.out.println(%22Done%22)%0A%09%09);%0A%09%09%0A%09%09//Consumer %7B void accept(T t); %7D%0A%0A%09%09Flowable.fromArray(1, 2, 3, 4).subscribe(new Consumer%3CInteger%3E() %7B%0A%09%09%09@Override%0A%09%09%09public void accept(Integer t) throws Exception %7B%0A%09%09%09%09System.out.printf(%22Entry %25d%5Cn%22, t);%0A%09%09%09%7D%0A%09%09%7D, new Consumer%3CThrowable%3E() %7B%0A%09%09%09@Override%0A%09%09%09public void accept(Throwable t) throws Exception %7B%0A%09%09%09%09System.err.printf(%22Failed to process: %25s%5Cn%22, t);%0A%09%09%09%7D%0A%09%09%7D, new Action() %7B%0A%09%09%09@Override%0A%09%09%09public void run() throws Exception %7B%0A%09%09%09%09System.out.println(%22Done%22);%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09%0A%09%09%0A%09%09//Subscriber %7B void onNext(T t); void onError(Throwable t); void onComplete(); %7D%0A%0A%09%09Subscriber%3CInteger%3E subscriber = new Subscriber%3CInteger%3E() %7B%0A%0A%09%09%09@Override%0A%09%09%09public void onSubscribe(Subscription s) %7B%0A%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public void onNext(Integer t) %7B%0A%09%09%09%09System.out.printf(%22Entry %25d%5Cn%22, t);%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public void onError(Throwable t) %7B%0A%09%09%09%09System.err.printf(%22Failed to process: %25s%5Cn%22, t);%0A%09%09%09%7D%0A%0A%09%09%09@Override%0A%09%09%09public void onComplete() %7B%0A%09%09%09%09System.out.println(%22Done%22);%0A%09%09%09%7D%0A%0A%09%09%7D;%0A%09%09Flowable.fromArray(1, 2, 3, 4).subscribe(subscriber);%0A%09%7D%0A%0A%7D%0A

Add RxJava Subscriber example (#4)