Skip to content

Commit 4cf0ad3

Browse files
author
laileon
committed
简化下 为了理解
1 parent 572500a commit 4cf0ad3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/com/blankj/custom/rxjava/Observable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static <T> Observable<T> create(OnSubscribe<T> onSubscribe) {
2222
}
2323

2424
public void subscribe(Subscriber<T> subscriber) {
25-
System.out.println("will call subscriber");
25+
System.out.println("will call subscriber\n");
2626
// subscriber.onStart();
2727
//onSubscribe来call这个subscriber
2828
onSubscribe.call(subscriber);

src/com/blankj/custom/rxjava/Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static void main(String[] args) {
66
//实例化接口实现类,需要override
77
@Override
88
public void call(Subscriber<Integer> subscriber) {
9-
System.out.println("call method execute");
9+
System.out.println("call method execute\n");
1010
for (int i = 0; i < 10; i++) {
1111
System.out.println("Prepare data " + i);
1212
subscriber.onNext(i);
@@ -27,7 +27,7 @@ public void onError(Throwable t) {
2727

2828
@Override
2929
public void onNext(Integer var1) {
30-
System.out.println(var1);
30+
System.out.println("Received data " + var1);
3131
}
3232
});
3333
}

0 commit comments

Comments
 (0)