8000 十三章修改语句拗口问题 by andyphone · Pull Request #630 · lingcoder/OnJava8 · GitHub
[go: up one dir, main page]

Skip to content

十三章修改语句拗口问题 #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Dec 7, 2020
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d88c904
1
Nov 19, 2020
6739439
Merge pull request #1 from LingCoder/master
andyphone Nov 24, 2020
ec2e1fa
2
Nov 24, 2020
c3373df
Merge branch 'master' of github.com:andyphone/OnJava8
Nov 24, 2020
7fbae68
没有第三种形式吧?
Nov 24, 2020
94afe9c
Merge pull request #2 from LingCoder/master
andyphone Nov 25, 2020
84e298c
修改语句拗口问题
Nov 25, 2020
429c653
修改语句拗口问题 2
Nov 25, 2020
34e5908
修改语句拗口问题 3
Nov 25, 2020
b027cf3
修改语句拗口问题 4
Nov 26, 2020
a183c0b
Merge pull request #3 from LingCoder/master
andyphone Nov 26, 2020
7ddf47f
修改语句拗口问题 5
Nov 26, 2020
57e0635
Merge branch 'master' of github.com:LingCoder/OnJava8
Nov 27, 2020
82aedb0
修改语句拗口问题 6
Nov 27, 2020
07231d7
修改语句拗口问题 7
Nov 27, 2020
b0d16e7
修改语句拗口问题 8
Nov 27, 2020
95a4cbb
修改语句拗口问题 9
Nov 27, 2020
826b9a2
拗口问题
andyphone Nov 29, 2020
ff9d336
修改语句拗口问题 10
Nov 30, 2020
a65ebda
Merge branch 'master' into master
andyphone Nov 30, 2020
446e2bd
修改语句拗口问题 11
Dec 1, 2020
e3e0f50
修改语句拗口问题 12
Dec 1, 2020
49dd428
修改语句拗口问题 13
Dec 1, 2020
25992cf
修改语句拗口问题 14
andyphone Dec 1, 2020
19d6135
Merge branch 'master' into master
andyphone Dec 1, 2020
1633ffd
修改语句拗口问题 14
Dec 2, 2020
8d1651b
修改语句拗口问题 15
Dec 3, 2020
1149eca
Merge pull request #4 from LingCoder/master
andyphone Dec 3, 2020
a4d14cc
修改语句拗口问题 16
Dec 3, 2020
1b97c98
修改语句拗口问题 17
Dec 4, 2020
952b2ff
十三章修改语句拗口问题
andyphone Dec 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
修改语句拗口问题 8
  • Loading branch information
jim.deng committed Nov 27, 2020
commit b0d16e7d49a38ff1b079308b989148bdf9629ae2
2 changes: 1 addition & 1 deletion docs/book/10-Interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ Woodwind.play() MIDDLE_C

## 完全解耦

每当一个方法与一个类而不是接口一起工作时,你只能应用那个类或它的子类。如果你想把这方法应用到一个继承层次之外的类,是做不到的。接口在很大程度上放宽了这个限制,因而使用接口可以编写复用性更好的代码。
每当一个方法与一个类而不是接口一起工作时(当方法的参数是类而不是接口),你只能应用那个类或它的子类。如果你想把这方法应用到一个继承层次之外的类,是做不到的。接口在很大程度上放宽了这个限制,因而使用接口可以编写复用性更好的代码。

例如有一个类 **Processor** 有两个方法 `name()` 和 `process()`。`process()` 方法接受输入,修改并输出。把这个类作为基类用来创建各种不同类型的 **Processor**。下例中,**Processor** 的各个子类修改 String 对象(注意,返回类型可能是协变类型而非参数类型):

Expand Down
0