回答編集履歴
1
校正
answer
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
throw new Exception("文字が未入力、または空白文字のみの入力により文字列として認識されませんでした");
|
|
6
6
|
}
|
|
7
7
|
```
|
|
8
|
-
```throws Exception```で修飾されたメソッドの呼び出し元は同じく```throws Exception```であるか```try-catch```
|
|
8
|
+
```throws Exception```で修飾されたメソッドの呼び出し元は同じく```throws Exception```であるか```try-catch```を実装することが義務付けられます
|
|
9
9
|
もし上記のいずれも満たさない場合はコンパイルエラーで弾かれるため、チェック漏れを事前に回避できます
|
|
10
10
|
|
|
11
11
|
> Main.java:7: error: unreported exception Exception; must be caught or declared to be thrown
|