Warning: Use of undefined constant ddsg_language - assumed 'ddsg_language' (this will throw an Error in a future version of PHP) in /home/ezic/ezic.info/public_html/w.ezic.info/wp-content/plugins/sitemap-generator/sitemap-generator.php on line 44
JavaでException(例外処理)の書き方 | EZiC[イージック]コンテンツ紹介!

JavaでException(例外処理)の書き方

※下記は投げられる例外に「NullPointerException」を想定。

JAVA:
  1. try{
  2.     // 通常の処理内容記述
  3.     // 例外処理(NullPointerException)
  4. } finally {
  5.     // 絶対に行う処理! ※例外が投げられようが、returnされようが
  6. }

タイトルとURLをコピーしました