daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Aug 19th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. Observable<Integer> numberObservable = Observable.fromArray(1, 2, 3, 4, 5);
  2.  
  3.         MathObservable.averageDouble(numberObservable)
  4.                 .subscribe(new Observer<Double>() {
  5.                     @Override
  6.                     public void onSubscribe(Disposable d) {
  7.  
  8.                     }
  9.  
  10.                     @Override
  11.                     public void onNext(Double aDouble) {
  12.                         System.out.println("Average: " + aDouble);
  13.                     }
  14.  
  15.                     @Override
  16.                     public void onError(Throwable e) {
  17.  
  18.                     }
  19.  
  20.                     @Override
  21.                     public void onComplete() {
  22.  
  23.                     }
  24.                 });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top