「Java」RuntimeExceptionのサンプル
説明
RuntimeExceptionは、Java仮想マシンの通常の処理でスローすることができる各種の例外のスーパー・クラスです。
使用例
int count = 0;
try {
count = Integer.parseInt(文字列);
} catch (Exception e) {
throw new RuntimeException();
}
int count = 0;
try {
count = Integer.parseInt(文字列);
} catch (Exception e) {
throw new RuntimeException();
}
int count = 0; try { count = Integer.parseInt(文字列); } catch (Exception e) { throw new RuntimeException(); }