Skip to content

fix typo in description of ch17 #2

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 2 commits into from
Dec 10, 2014
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions docs/CH17.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class SomethingDemo {
Note: SomethingDemo.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

想要知道詳細的警訊內容的話,可以在編譯時加上 -Xline:deprecation 引數,編譯器會告訴您是因為您使用了某個被 @Deprecated 標示了的方法而提出警訊,加上 -Xline:deprecation 引數顯示的完整訊息如下:
想要知道詳細的警訊內容的話,可以在編譯時加上 -Xlint:deprecation 引數,編譯器會告訴您是因為您使用了某個被 @Deprecated 標示了的方法而提出警訊,加上 -Xlint:deprecation 引數顯示的完整訊息如下:

javac -Xlint:deprecation -d . SomethingDemo.java
SomethingDemo.java:6: warning: [deprecation] getSomething() in
Expand Down Expand Up @@ -162,7 +162,7 @@ public class SomeClass2 {
}
```

這麼一來,編譯器將忽略掉 "unckecked" 的警訊,您也可以指定忽略多個警訊:
這麼一來,編譯器將忽略掉 "unchecked" 的警訊,您也可以指定忽略多個警訊:

@SuppressWarnings(value={"unchecked", "deprecation"})

Expand Down