File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public class SomethingDemo {
100
100
Note: SomethingDemo.java uses or overrides a deprecated API.
101
101
Note: Recompile with -Xlint:deprecation for details.
102
102
103
- 想要知道詳細的警訊內容的話,可以在編譯時加上 -Xline : deprecation 引數,編譯器會告訴您是因為您使用了某個被 @Deprecated 標示了的方法而提出警訊,加上 -Xline : deprecation 引數顯示的完整訊息如下:
103
+ 想要知道詳細的警訊內容的話,可以在編譯時加上 -Xlint : deprecation 引數,編譯器會告訴您是因為您使用了某個被 @Deprecated 標示了的方法而提出警訊,加上 -Xlint : deprecation 引數顯示的完整訊息如下:
104
104
105
105
javac -Xlint:deprecation -d . SomethingDemo.java
106
106
SomethingDemo.java:6: warning: [deprecation] getSomething() in
@@ -162,7 +162,7 @@ public class SomeClass2 {
162
162
}
163
163
```
164
164
165
- 這麼一來,編譯器將忽略掉 "unckecked " 的警訊,您也可以指定忽略多個警訊:
165
+ 這麼一來,編譯器將忽略掉 "unchecked " 的警訊,您也可以指定忽略多個警訊:
166
166
167
167
@SuppressWarnings(value={"unchecked", "deprecation"})
168
168
You can’t perform that action at this time.
0 commit comments