{"id":1114,"date":"2024-11-21T16:00:10","date_gmt":"2024-11-21T07:00:10","guid":{"rendered":"https:\/\/dexall.co.jp\/articles\/?p=1114"},"modified":"2025-03-24T08:52:44","modified_gmt":"2025-03-23T23:52:44","slug":"java-2%e6%ac%a1%e5%85%83%e9%85%8d%e5%88%97%e3%81%ae%e5%ae%8c%e5%85%a8%e3%82%ac%e3%82%a4%e3%83%89%ef%bc%9a%e5%88%9d%e6%9c%9f%e5%8c%96%e3%81%8b%e3%82%89%e5%bf%9c%e7%94%a8%e3%81%be%e3%81%a715%e3%81%ae","status":"publish","type":"post","link":"https:\/\/dexall.co.jp\/articles\/?p=1114","title":{"rendered":"Java 2\u6b21\u5143\u914d\u5217\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\uff1a\u521d\u671f\u5316\u304b\u3089\u5fdc\u7528\u307e\u306715\u306e\u5b9f\u8df5\u4f8b\u3067\u5b66\u3076"},"content":{"rendered":"<div id=\"sgb-css-id-1\">\n<h4 class=\"wp-block-heading\" id=\"i-0\">\u306f\u3058\u3081\u306b<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-2\">\n<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3044\u3066\u30012\u6b21\u5143\u914d\u5217\u306f\u8868\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u6271\u3046\u4e0a\u3067\u975e\u5e38\u306b\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u7279\u306bJava\u3067\u306f\u3001\u30b2\u30fc\u30e0\u958b\u767a\u3001\u753b\u50cf\u51e6\u7406\u3001\u884c\u5217\u8a08\u7b97\u306a\u3069\u3001\u69d8\u3005\u306a\u5206\u91ce\u30672\u6b21\u5143\u914d\u5217\u304c\u6d3b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-3\">\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u30012\u6b21\u5143\u914d\u5217\u306e\u57fa\u790e\u304b\u3089\u5b9f\u8df5\u7684\u306a\u5fdc\u7528\u307e\u3067\u3001\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u4f8b\u3092\u4ea4\u3048\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-8\">\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u672c\u8a18\u4e8b\u3067\u5b66\u3079\u308b\u3053\u3068<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\"><div id=\"sgb-css-id-4\">\n<li>2\u6b21\u5143\u914d\u5217\u306e\u57fa\u672c\u6982\u5ff5\u3068\u52b9\u7387\u7684\u306a\u4f7f\u3044\u65b9<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-5\">\n<li>\u3055\u307e\u3056\u307e\u306a\u521d\u671f\u5316\u65b9\u6cd5\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-6\">\n<li>\u5b9f\u52d9\u3067\u4f7f\u3048\u308b\u64cd\u4f5c\u30c6\u30af\u30cb\u30c3\u30af\u3068\u5fdc\u7528\u4f8b<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-7\">\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8003\u616e\u3057\u305f\u5b9f\u88c5\u65b9\u6cd5<\/li>\n<\/div>\n\n\n<li>\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc\u306e\u56de\u907f\u65b9\u6cd5\u3068\u5bfe\u7b56<\/li>\n<\/ul>\n<\/div><\/div>\n<\/div>\n\n<div id=\"sgb-css-id-9\">\n<h4 class=\"wp-block-heading\" id=\"i-1\">\u74b0\u5883\u8a2d\u5b9a<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-10\">\n<p>\u672c\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u74b0\u5883\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-11\">\n<p>\u3000\u25cf Java 8\u4ee5\u964d<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-12\">\n<p>\u3000\u25cf \u4efb\u610f\u306eJava IDE\uff08Eclipse, IntelliJ IDEA, VS Code\u306a\u3069\uff09<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-13\">\n<p>\u305d\u308c\u3067\u306f\u30012\u6b21\u5143\u914d\u5217\u306e\u57fa\u790e\u304b\u3089\u3001\u5b9f\u8df5\u7684\u306a\u5fdc\u7528\u65b9\u6cd5\u307e\u3067\u3001\u6bb5\u968e\u7684\u306b\u5b66\u3093\u3067\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u5404\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u306f\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u4f8b\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u624b\u5143\u3067\u5b9f\u969b\u306b\u8a66\u3057\u306a\u304c\u3089\u7406\u89e3\u3092\u6df1\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-14\">\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"\u76ee\u6b21\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <a href=\"#i-2\">\uff11\uff0e2\u6b21\u5143\u914d\u5217\u306e\u57fa\u790e\u77e5\u8b58<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-3\">1.1  2\u6b21\u5143\u914d\u5217\u3068\u306f\u4f55\u304b\uff1a\u76f4\u611f\u7684\u306b\u7406\u89e3\u3059\u308b\u884c\u3068\u5217\u306e\u6982\u5ff5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-4\">1.2  1\u6b21\u5143\u914d\u5217\u3068\u306e\u9055\u3044\u3068\u5229\u70b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-9\">\uff12\uff0e2\u6b21\u5143\u914d\u5217\u306e\u5ba3\u8a00\u3068\u521d\u671f\u5316<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-10\">2.1 \u57fa\u672c\u7684\u306a\u5ba3\u8a00\u65b9\u6cd5\u30683\u3064\u306e\u521d\u671f\u5316\u30d1\u30bf\u30fc\u30f3<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-14\">2.2 \u53ef\u5909\u9577\u306e2\u6b21\u5143\u914d\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-19\">\uff13\uff0e2\u6b21\u5143\u914d\u5217\u306e\u64cd\u4f5c\u65b9\u6cd5<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-20\">3.1 \u8981\u7d20\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3068\u30eb\u30fc\u30d7\u51e6\u7406\u306e\u57fa\u672c<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-24\">3.2 \u591a\u91cd\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u305f\u52b9\u7387\u7684\u306a\u51e6\u7406\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-29\">\uff14\uff0e\u5b9f\u8df5\u7684\u306a\u4f7f\u7528\u4f8b\u3068\u5fdc\u7528<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-30\">4.1 \u884c\u5217\u6f14\u7b97\u3067\u306e\u6d3b\u7528\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-31\">4.2 \u30b2\u30fc\u30e0\u958b\u767a\u3067\u306e\u76e4\u9762\u7ba1\u7406\u3078\u306e\u5fdc\u7528<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-32\">4.3 \u753b\u50cf\u51e6\u7406\u306b\u304a\u3051\u308b2\u6b21\u5143\u914d\u5217\u306e\u4f7f\u7528<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-33\">\uff15\uff0e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-34\">5.1 \u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u5b9f\u88c5\u65b9\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-37\">5.2 \u3088\u304f\u3042\u308b\u30d0\u30b0\u3068\u56de\u907f\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-42\">\uff16\uff0eJava 8\u4ee5\u964d\u3067\u306e2\u6b21\u5143\u914d\u5217\u64cd\u4f5c<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-43\">6.1 Stream API\u3092\u4f7f\u3063\u305f\u52b9\u7387\u7684\u306a\u51e6\u7406<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-46\">6.2 \u30e2\u30c0\u30f3\u306a\u5b9f\u88c5\u30d1\u30bf\u30fc\u30f3\u3068\u4e8b\u4f8b<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-50\">\uff17\uff0e\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-51\">7.1 NullPointerException\u306e\u9632\u304e\u65b9<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-54\">7.2 ArrayIndexOutOfBoundsException\u306e\u56de\u907f\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li class=\"last\">    <a href=\"#i-58\">\u307e\u3068\u3081\uff1aJava 2\u6b21\u5143\u914d\u5217\u306e\u5b9f\u8df5\u7684\u6d3b\u7528\u306b\u5411\u3051\u3066<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-59\">\u672c\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u91cd\u8981\u30dd\u30a4\u30f3\u30c8<\/a>      <\/li>      <li>        <a href=\"#i-65\">\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/a>      <\/li>      <li>        <a href=\"#i-66\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-67\">\u6700\u5f8c\u306b<\/a>      <\/li>    <\/ul>  <\/li><\/ul>\n      <a href=\"#\" class=\"sgb-toc-button js-toc-button\" rel=\"nofollow\" data-open-dialog=\"true\"><i class=\"fa fa-list\"><\/i><span class=\"sgb-toc-button__text\">\u76ee\u6b21\u3078<\/span><\/a>\n    <\/div><\/div><h2 class=\"wp-block-heading\" id=\"i-2\">\uff11\uff0e2\u6b21\u5143\u914d\u5217\u306e\u57fa\u790e\u77e5\u8b58<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-15\">\n<h3 class=\"wp-block-heading\" id=\"i-3\">1.1  2\u6b21\u5143\u914d\u5217\u3068\u306f\u4f55\u304b\uff1a\u76f4\u611f\u7684\u306b\u7406\u89e3\u3059\u308b\u884c\u3068\u5217\u306e\u6982\u5ff5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-16\">\n<p>2\u6b21\u5143\u914d\u5217\u306f\u3001\u30c7\u30fc\u30bf\u3092\u884c\u3068\u5217\u306e\u683c\u5b50\u72b6\u306b\u914d\u7f6e\u3067\u304d\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084\u30de\u30b9\u76ee\u306e\u3088\u3046\u306a\u5f62\u3067\u8868\u73fe\u3067\u304d\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-20\">\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">2\u6b21\u5143\u914d\u5217\u306e\u7279\u5fb4<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\"><div id=\"sgb-css-id-17\">\n<li>\u884c\u3068\u5217\u306e2\u3064\u306e\u6b21\u5143\u3067\u30c7\u30fc\u30bf\u3092\u7ba1\u7406<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-18\">\n<li>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f[\u884c][\u5217]\u306e\u5f62\u5f0f\u3067\u30a2\u30af\u30bb\u30b9<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-19\">\n<li>\u540c\u3058\u30c7\u30fc\u30bf\u578b\u306e\u8981\u7d20\u3092\u77e9\u5f62\u72b6\u306b\u914d\u7f6e<\/li>\n<\/div><\/ul>\n<\/div><\/div>\n<\/div>\n\n<div id=\"sgb-css-id-21\">\n<p>\u4f8b\u3048\u3070\u30013\u00d74\u306e2\u6b21\u5143\u914d\u5217\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8996\u899a\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[0][0] [0][1] [0][2] [0][3]\n[1][0] [1][1] [1][2] [1][3]\n[2][0] [2][1] [2][2] [2][3]<\/pre>\n\n\n<div id=\"sgb-css-id-22\">\n<p>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u306e\u8868\u73fe\u4f8b\uff1a<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ 3\u884c4\u5217\u306e2\u6b21\u5143\u914d\u5217\u3092\u4f5c\u6210\nint[][] grid = {\n    {1, 2, 3, 4},    \/\/ 0\u884c\u76ee\n    {5, 6, 7, 8},    \/\/ 1\u884c\u76ee\n    {9, 10, 11, 12}  \/\/ 2\u884c\u76ee\n};<\/pre>\n\n\n<div id=\"sgb-css-id-23\">\n<h3 class=\"wp-block-heading\" id=\"i-4\">1.2  1\u6b21\u5143\u914d\u5217\u3068\u306e\u9055\u3044\u3068\u5229\u70b9<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-24\">\n<h4 class=\"wp-block-heading\" id=\"i-5\">\u69cb\u9020\u306e\u9055\u3044<\/h4>\n<\/div>\n\n<div id=\"id-e8041690-faf0-4d75-9ce9-044449a3b5c7\"><div id=\"sgb-css-id-25\">\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u7279\u5fb4<\/th><th>1\u6b21\u5143\u914d\u5217<\/th><th>2\u6b21\u5143\u914d\u5217<\/th><\/tr><\/thead><tbody><tr><td>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/td><td>\u5358\u4e00\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9[i]<\/td><td>2\u3064\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9[i][j]<\/td><\/tr><tr><td>\u30c7\u30fc\u30bf\u306e\u914d\u7f6e<\/td><td>\u76f4\u7dda\u7684<\/td><td>\u683c\u5b50\u72b6<\/td><\/tr><tr><td>\u30e1\u30e2\u30ea\u69cb\u9020<\/td><td>\u9023\u7d9a\u3057\u305f\u30e1\u30e2\u30ea\u9818\u57df<\/td><td>\u914d\u5217\u306e\u914d\u5217\uff08\u30b8\u30e3\u30b0\u914d\u5217\u53ef\u80fd\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div><\/div>\n\n<div id=\"sgb-css-id-26\">\n<h4 class=\"wp-block-heading\" id=\"i-6\">2\u6b21\u5143\u914d\u5217\u306e\u4e3b\u306a\u5229\u70b9<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-27\">\n<p>1. <strong>\u30c7\u30fc\u30bf\u306e\u81ea\u7136\u306a\u8868\u73fe<\/strong><\/p>\n<\/div>\n\n<div id=\"sgb-css-id-28\">\n<p>\u3000\u25cf \u8868\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u76f4\u611f\u7684\u306b\u8868\u73fe\u53ef\u80fd<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-29\">\n<p>\u3000\u25cf \u5ea7\u6a19\u7cfb\u3092\u4f7f\u7528\u3059\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u6700\u9069<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-30\">\n<p>\u3000\u25cf \u884c\u5217\u6f14\u7b97\u306e\u5b9f\u88c5\u304c\u5bb9\u6613<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-31\">\n<p>2. <strong><strong>\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u64cd\u4f5c<\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   \/\/ \u4f8b\uff1a\u30c1\u30a7\u30b9\u76e4\u306e\u8868\u73fe\n   char[][] chessBoard = new char[8][8];\n   \/\/ \u7279\u5b9a\u306e\u30de\u30b9\u306e\u99d2\u3092\u53d6\u5f97\n   char piece = chessBoard[row][column];<\/pre>\n\n\n<div id=\"sgb-css-id-32\">\n<p>3. <strong><strong><strong>\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u7c21\u7565\u5316<\/strong><\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   \/\/ \u4f8b\uff1a\u8ff7\u8def\u306e\u8868\u73fe\n   int[][] maze = {\n       {0, 1, 0, 0},\n       {0, 1, 1, 0},\n       {0, 0, 0, 0}\n   };\n   \/\/ 0\u306f\u901a\u8def\u30011\u306f\u58c1\u3092\u8868\u3059<\/pre>\n\n\n<div id=\"sgb-css-id-33\">\n<h4 class=\"wp-block-heading\" id=\"i-7\">\u5b9f\u969b\u306e\u4f7f\u7528\u30b7\u30fc\u30f3<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-34\">\n<p>2\u6b21\u5143\u914d\u5217\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u9762\u3067\u7279\u306b\u6709\u7528\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">2\u6b21\u5143\u914d\u5217\u3067\u6709\u7528\u306a\u5834\u9762<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\"><div id=\"sgb-css-id-35\">\n<li>\u30b2\u30fc\u30e0\u958b\u767a\uff08\u76e4\u9762\u72b6\u614b\u306e\u7ba1\u7406\uff09<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-36\">\n<li>\u753b\u50cf\u51e6\u7406\uff08\u30d4\u30af\u30bb\u30eb\u60c5\u5831\u306e\u7ba1\u7406\uff09<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-37\">\n<li>\u8868\u8a08\u7b97\uff08\u30bb\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u7ba1\u7406\uff09<\/li>\n<\/div>\n\n<div id=\"sgb-css-id-38\">\n<li>\u884c\u5217\u8a08\u7b97\uff08\u6570\u5b66\u7684\u6f14\u7b97\uff09<\/li>\n<\/div>\n\n\n<li>\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u51e6\u7406\uff08\u5ea7\u6a19\u7ba1\u7406\uff09<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n<div id=\"sgb-css-id-39\">\n<h4 class=\"wp-block-heading\" id=\"i-8\">\u30e1\u30e2\u30ea\u7ba1\u7406\u306e\u9055\u3044<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-40\">\n<p>1\u6b21\u5143\u914d\u5217\u3068\u6bd4\u8f03\u3057\u305f\u5834\u5408\u306e\u91cd\u8981\u306a\u9055\u3044\u3002<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ 1\u6b21\u5143\u914d\u5217\u306e\u30e1\u30e2\u30ea\u914d\u7f6e\nint[] array1D = new int[4];  \/\/ [0][1][2][3]\n\n\/\/ 2\u6b21\u5143\u914d\u5217\u306e\u30e1\u30e2\u30ea\u914d\u7f6e\nint[][] array2D = new int[2][2];\n\/* \u5b9f\u969b\u306e\u30e1\u30e2\u30ea\u69cb\u9020:\n   array2D \u2192 [\u53c2\u7167][\u53c2\u7167]\n             \u2193    \u2193\n             [0][1] [0][1]\n*\/<\/pre>\n\n\n<div id=\"sgb-css-id-41\">\n<p>\u3053\u306e\u57fa\u790e\u77e5\u8b58\u3092\u8e0f\u307e\u3048\u308b\u3053\u3068\u3067\u30012\u6b21\u5143\u914d\u5217\u306e\u52b9\u679c\u7684\u306a\u6d3b\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3001\u3088\u308a\u6df1\u304f\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-42\">\n<h2 class=\"wp-block-heading\" id=\"i-9\">\uff12\uff0e2\u6b21\u5143\u914d\u5217\u306e\u5ba3\u8a00\u3068\u521d\u671f\u5316<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-43\">\n<h3 class=\"wp-block-heading\" id=\"i-10\">2.1 \u57fa\u672c\u7684\u306a\u5ba3\u8a00\u65b9\u6cd5\u30683\u3064\u306e\u521d\u671f\u5316\u30d1\u30bf\u30fc\u30f3<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-44\">\n<p>2\u6b21\u5143\u914d\u5217\u306e\u5ba3\u8a00\u3068\u521d\u671f\u5316\u306b\u306f\u3001\u7528\u9014\u306b\u5fdc\u3058\u3066\u8907\u6570\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u7279\u5fb4\u3068\u4f7f\u3044\u5206\u3051\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-45\">\n<h4 class=\"wp-block-heading\" id=\"i-11\">1. \u5ba3\u8a00\u3068\u540c\u6642\u306b\u521d\u671f\u5316<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u30d1\u30bf\u30fc\u30f31: \u5024\u3092\u76f4\u63a5\u6307\u5b9a\u3057\u3066\u521d\u671f\u5316\nint[][] matrix = {\n    {1, 2, 3},\n    {4, 5, 6},\n    {7, 8, 9}\n};\n\n\/\/ \u30d1\u30bf\u30fc\u30f32: new\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u305f\u521d\u671f\u5316\uff08\u5024\u306f0\u3067\u521d\u671f\u5316\uff09\nint[][] grid = new int[3][4];  \/\/ 3\u884c4\u5217\u306e\u914d\u5217\n\n\/\/ \u30d1\u30bf\u30fc\u30f33: \u5ba3\u8a00\u3068\u521d\u671f\u5316\u3092\u5206\u96e2\nint[][] array;                 \/\/ \u5ba3\u8a00\narray = new int[2][2];        \/\/ \u521d\u671f\u5316<\/pre>\n\n\n<div id=\"sgb-css-id-46\">\n<h4 class=\"wp-block-heading\" id=\"i-12\">\u521d\u671f\u5316\u6642\u306e\u6ce8\u610f\u70b9\u3068\u578b\u306b\u3088\u308b\u9055\u3044<\/h4>\n<\/div>\n\n<div id=\"id-b46ea1fd-4ae2-43cf-938a-178db286b178\"><div id=\"sgb-css-id-47\">\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u30c7\u30fc\u30bf\u578b<\/th><th>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/th><th>\u4f7f\u7528\u4f8b<\/th><\/tr><\/thead><tbody><tr><td>int[][]<\/td><td>0<\/td><td><code>int[][] nums = new int[3][3];<\/code><\/td><\/tr><tr><td>double[][]<\/td><td>0.0<\/td><td><code>double[][] values = new double[2][2];<\/code><\/td><\/tr><tr><td>boolean[][]<\/td><td>false<\/td><td><code>boolean[][] flags = new boolean[2][3];<\/code><\/td><\/tr><tr><td>String[][]<\/td><td>null<\/td><td><code>String[][] words = new String[2][4];<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div><\/div>\n\n<div id=\"sgb-css-id-48\">\n<h4 class=\"wp-block-heading\" id=\"i-13\">\u521d\u671f\u5316\u30d1\u30bf\u30fc\u30f3\u306e\u4f7f\u3044\u5206\u3051<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ 1. \u30b5\u30a4\u30ba\u304c\u56fa\u5b9a\u3067\u521d\u671f\u5024\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\u5834\u5408\nchar[][] gameBoard = {\n    {'X', 'O', 'X'},\n    {'O', 'X', 'O'},\n    {'X', 'O', 'X'}\n};\n\n\/\/ 2. \u30b5\u30a4\u30ba\u306e\u307f\u6c7a\u307e\u3063\u3066\u3044\u308b\u5834\u5408\nint[][] scores = new int[5][3];  \/\/ \u5f8c\u3067\u5024\u3092\u8a2d\u5b9a\n\n\/\/ 3. \u7e70\u308a\u8fd4\u3057\u51e6\u7406\u306b\u3088\u308b\u521d\u671f\u5316\nint[][] multiplication = new int[10][10];\nfor (int i = 0; i &lt; 10; i++) {\n    for (int j = 0; j &lt; 10; j++) {\n        multiplication[i][j] = (i + 1) * (j + 1);\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-49\">\n<h3 class=\"wp-block-heading\" id=\"i-14\">2.2 \u53ef\u5909\u9577\u306e2\u6b21\u5143\u914d\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-50\">\n<p>Java\u3067\u306f\u3001\u5404\u884c\u306e\u9577\u3055\u3092\u7570\u306a\u308b\u30b5\u30a4\u30ba\u306b\u3067\u304d\u308b\u300c\u30b8\u30e3\u30b0\u914d\u5217\u300d\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-51\">\n<h4 class=\"wp-block-heading\" id=\"i-15\">\u30b8\u30e3\u30b0\u914d\u5217\u306e\u57fa\u672c<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u884c\u3054\u3068\u306b\u7570\u306a\u308b\u9577\u3055\u3092\u6301\u3064\u914d\u5217\u306e\u4f5c\u6210\nint[][] jaggedArray = new int[3][];  \/\/ \u6700\u521d\u306f\u884c\u6570\u306e\u307f\u6307\u5b9a\njaggedArray[0] = new int[2];         \/\/ 1\u884c\u76ee\u306f2\u5217\njaggedArray[1] = new int[4];         \/\/ 2\u884c\u76ee\u306f4\u5217\njaggedArray[2] = new int[3];         \/\/ 3\u884c\u76ee\u306f3\u5217<\/pre>\n\n\n<div id=\"sgb-css-id-52\">\n<h4 class=\"wp-block-heading\" id=\"i-16\">\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u5b9f\u88c5\u4f8b<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class DynamicArray {\n    public static int[][] createDynamicArray(int[] rowSizes) {\n        \/\/ \u5404\u884c\u306e\u30b5\u30a4\u30ba\u3092\u914d\u5217\u3067\u53d7\u3051\u53d6\u308a\u3001\u53ef\u5909\u9577\u306e2\u6b21\u5143\u914d\u5217\u3092\u4f5c\u6210\n        int[][] dynamic = new int[rowSizes.length][];\n        for (int i = 0; i &lt; rowSizes.length; i++) {\n            dynamic[i] = new int[rowSizes[i]];\n        }\n        return dynamic;\n    }\n\n    public static void main(String[] args) {\n        \/\/ \u4f7f\u7528\u4f8b\n        int[] sizes = {2, 4, 3};\n        int[][] array = createDynamicArray(sizes);\n\n        \/\/ \u5404\u884c\u306e\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\n        for (int i = 0; i &lt; array.length; i++) {\n            System.out.printf(\"Row %d length: %d%n\", \n                            i, array[i].length);\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-53\">\n<h4 class=\"wp-block-heading\" id=\"i-17\">\u53ef\u5909\u9577\u914d\u5217\u306e\u6d3b\u7528\u30b7\u30fc\u30f3<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-54\">\n<p>1. <strong>\u4e0d\u898f\u5247\u306a\u30c7\u30fc\u30bf\u69cb\u9020<\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u4f8b\uff1a\u5b66\u751f\u3054\u3068\u306e\u53d7\u8b1b\u79d1\u76ee\uff08\u79d1\u76ee\u6570\u304c\u7570\u306a\u308b\uff09\nString[][] studentCourses = new String[3][];\nstudentCourses[0] = new String[]{\"Math\", \"Science\"};\nstudentCourses[1] = new String[]{\"Math\", \"English\", \"History\"};\nstudentCourses[2] = new String[]{\"Science\", \"Art\"};<\/pre>\n\n\n<div id=\"sgb-css-id-55\">\n<p>2. <strong><strong>\u30e1\u30e2\u30ea\u6700\u9069\u5316<\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u4e09\u89d2\u914d\u5217\nint[][] triangle = new int[5][];\nfor (int i = 0; i &lt; 5; i++) {\n    triangle[i] = new int[i + 1];  \/\/ \u884c\u3054\u3068\u306b1\u5217\u305a\u3064\u5897\u52a0\n}<\/pre>\n\n\n<div id=\"sgb-css-id-56\">\n<h4 class=\"wp-block-heading\" id=\"i-18\">\u521d\u671f\u5316\u6642\u306e\u6ce8\u610f\u70b9<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-57\">\n<p>\u3000\u25cf \u30b8\u30e3\u30b0\u914d\u5217\u4f5c\u6210\u6642\u306f\u3001\u6700\u521d\u306b\u884c\u6570\u306e\u307f\u3092\u6307\u5b9a\u3059\u308b<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-58\">\n<p>\u3000\u25cf \u5404\u884c\u306f\u500b\u5225\u306b\u521d\u671f\u5316\u304c\u5fc5\u8981<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-59\">\n<p>\u3000\u25cf \u672a\u521d\u671f\u5316\u306e\u884c\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068NullPointerException\u304c\u767a\u751f<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-60\">\n<p>\u3000\u25cf \u914d\u5217\u306e\u30b5\u30a4\u30ba\u306f\u5b9f\u884c\u6642\u306b\u52d5\u7684\u306b\u6c7a\u5b9a\u53ef\u80fd<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u5b89\u5168\u306a\u521d\u671f\u5316\u30d1\u30bf\u30fc\u30f3\npublic static int[][] createSafeArray(int rows) {\n    if (rows &lt;= 0) {\n        throw new IllegalArgumentException(\"\u884c\u6570\u306f1\u4ee5\u4e0a\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\");\n    }\n\n    int[][] array = new int[rows][];\n    for (int i = 0; i &lt; rows; i++) {\n        \/\/ \u5404\u884c\u306e\u30b5\u30a4\u30ba\u3092\u8a08\u7b97\u3057\u3066\u521d\u671f\u5316\n        int cols = i + 1;  \/\/ \u4f8b\uff1a\u884c\u3054\u3068\u306b\u5217\u6570\u3092\u5897\u3084\u3059\n        array[i] = new int[cols];\n    }\n    return array;\n}<\/pre>\n\n\n<div id=\"sgb-css-id-61\">\n<h2 class=\"wp-block-heading\" id=\"i-19\">\uff13\uff0e2\u6b21\u5143\u914d\u5217\u306e\u64cd\u4f5c\u65b9\u6cd5<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-62\">\n<h3 class=\"wp-block-heading\" id=\"i-20\">3.1 \u8981\u7d20\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3068\u30eb\u30fc\u30d7\u51e6\u7406\u306e\u57fa\u672c<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-63\">\n<p>2\u6b21\u5143\u914d\u5217\u306e\u8981\u7d20\u64cd\u4f5c\u306b\u306f\u3001\u884c\u3068\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30a2\u30af\u30bb\u30b9\u65b9\u6cd5\u3068\u3001\u69d8\u3005\u306a\u30eb\u30fc\u30d7\u30d1\u30bf\u30fc\u30f3\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-64\">\n<h4 class=\"wp-block-heading\" id=\"i-21\">\u57fa\u672c\u7684\u306a\u30a2\u30af\u30bb\u30b9\u65b9\u6cd5<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ArrayAccess {\n    public static void main(String[] args) {\n        \/\/ \u30b5\u30f3\u30d7\u30eb\u914d\u5217\u306e\u4f5c\u6210\n        int[][] array = {\n            {1, 2, 3},\n            {4, 5, 6},\n            {7, 8, 9}\n        };\n\n        \/\/ \u5358\u4e00\u8981\u7d20\u3078\u306e\u30a2\u30af\u30bb\u30b9\n        int element = array[1][2];  \/\/ 2\u884c\u76ee\u30013\u5217\u76ee\u306e\u8981\u7d20(\u5024: 6)\n\n        \/\/ \u8981\u7d20\u306e\u66f4\u65b0\n        array[0][1] = 10;  \/\/ 1\u884c\u76ee\u30012\u5217\u76ee\u306e\u8981\u7d20\u309210\u306b\u66f4\u65b0\n\n        \/\/ \u914d\u5217\u306e\u30b5\u30a4\u30ba\u53d6\u5f97\n        int rows = array.length;        \/\/ \u884c\u6570\n        int cols = array[0].length;     \/\/ \u5217\u6570\uff08\u6700\u521d\u306e\u884c\u306e\u9577\u3055\uff09\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-65\">\n<h4 class=\"wp-block-heading\" id=\"i-22\">\u57fa\u672c\u7684\u306a\u30eb\u30fc\u30d7\u30d1\u30bf\u30fc\u30f3<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-66\">\n<p>1. <strong>for\u6587\u306b\u3088\u308b\u8d70\u67fb<\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void printArray(int[][] array) {\n    \/\/ \u914d\u5217\u306e\u5185\u5bb9\u3092\u6574\u5f62\u3057\u3066\u8868\u793a\n    for (int i = 0; i &lt; array.length; i++) {\n        for (int j = 0; j &lt; array[i].length; j++) {\n            System.out.printf(\"%4d\", array[i][j]); \/\/ 4\u6841\u3067\u6574\u5f62\n        }\n        System.out.println(); \/\/ \u6539\u884c\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-67\">\n<p>2. <strong><strong>\u62e1\u5f35for\u6587\uff08foreach\uff09\u306b\u3088\u308b\u8d70\u67fb<\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void printArrayForEach(int[][] array) {\n    for (int[] row : array) {\n        for (int element : row) {\n            System.out.printf(\"%4d\", element);\n        }\n        System.out.println();\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-68\">\n<h4 class=\"wp-block-heading\" id=\"i-23\">\u914d\u5217\u64cd\u4f5c\u306e\u57fa\u672c\u30d1\u30bf\u30fc\u30f3<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ArrayOperations {\n    \/\/ \u914d\u5217\u306e\u5408\u8a08\u5024\u3092\u8a08\u7b97\n    public static int sumArray(int[][] array) {\n        int sum = 0;\n        for (int[] row : array) {\n            for (int element : row) {\n                sum += element;\n            }\n        }\n        return sum;\n    }\n\n    \/\/ \u7279\u5b9a\u306e\u5024\u3092\u691c\u7d22\n    public static boolean findElement(int[][] array, int target) {\n        for (int i = 0; i &lt; array.length; i++) {\n            for (int j = 0; j &lt; array[i].length; j++) {\n                if (array[i][j] == target) {\n                    System.out.printf(\"Found at [%d][%d]%n\", i, j);\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-69\">\n<h3 class=\"wp-block-heading\" id=\"i-24\">3.2 \u591a\u91cd\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u305f\u52b9\u7387\u7684\u306a\u51e6\u7406\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-70\">\n<p>\u3088\u308a\u8907\u96d1\u306a\u64cd\u4f5c\u3084\u52b9\u7387\u7684\u306a\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u9ad8\u5ea6\u306a\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-71\">\n<h4 class=\"wp-block-heading\" id=\"i-25\">1. \u5883\u754c\u8d70\u67fb\u30d1\u30bf\u30fc\u30f3<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class BorderTraversal {\n    public static void printBorder(int[][] array) {\n        int rows = array.length;\n        int cols = array[0].length;\n\n        \/\/ \u4e0a\u7aef\n        for (int j = 0; j &lt; cols; j++) {\n            System.out.print(array[0][j] + \" \");\n        }\n        \/\/ \u53f3\u7aef\n        for (int i = 1; i &lt; rows; i++) {\n            System.out.print(array[i][cols-1] + \" \");\n        }\n        \/\/ \u4e0b\u7aef\uff08\u53f3\u304b\u3089\u5de6\uff09\n        for (int j = cols-2; j &gt;= 0; j--) {\n            System.out.print(array[rows-1][j] + \" \");\n        }\n        \/\/ \u5de6\u7aef\uff08\u4e0b\u304b\u3089\u4e0a\uff09\n        for (int i = rows-2; i &gt; 0; i--) {\n            System.out.print(array[i][0] + \" \");\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-72\">\n<h4 class=\"wp-block-heading\" id=\"i-26\">2. \u5bfe\u89d2\u7dda\u8d70\u67fb\u30d1\u30bf\u30fc\u30f3<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class DiagonalTraversal {\n    \/\/ \u30e1\u30a4\u30f3\u5bfe\u89d2\u7dda\u306e\u8981\u7d20\u3092\u53d6\u5f97\n    public static void printMainDiagonal(int[][] array) {\n        int size = Math.min(array.length, array[0].length);\n        for (int i = 0; i &lt; size; i++) {\n            System.out.print(array[i][i] + \" \");\n        }\n    }\n\n    \/\/ \u526f\u5bfe\u89d2\u7dda\u306e\u8981\u7d20\u3092\u53d6\u5f97\n    public static void printSecondaryDiagonal(int[][] array) {\n        int rows = array.length;\n        int cols = array[0].length;\n        int size = Math.min(rows, cols);\n        for (int i = 0; i &lt; size; i++) {\n            System.out.print(array[i][cols-1-i] + \" \");\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-73\">\n<h4 class=\"wp-block-heading\" id=\"i-27\">3. \u30b9\u30d1\u30a4\u30e9\u30eb\u8d70\u67fb\u30d1\u30bf\u30fc\u30f3<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class SpiralTraversal {\n    public static void printSpiral(int[][] array) {\n        int top = 0, bottom = array.length - 1;\n        int left = 0, right = array[0].length - 1;\n\n        while (top &lt;= bottom &amp;&amp; left &lt;= right) {\n            \/\/ \u4e0a\u6bb5: \u5de6\u304b\u3089\u53f3\n            for (int j = left; j &lt;= right; j++) {\n                System.out.print(array[top][j] + \" \");\n            }\n            top++;\n\n            \/\/ \u53f3\u5217: \u4e0a\u304b\u3089\u4e0b\n            for (int i = top; i &lt;= bottom; i++) {\n                System.out.print(array[i][right] + \" \");\n            }\n            right--;\n\n            if (top &lt;= bottom) {\n                \/\/ \u4e0b\u6bb5: \u53f3\u304b\u3089\u5de6\n                for (int j = right; j &gt;= left; j--) {\n                    System.out.print(array[bottom][j] + \" \");\n                }\n                bottom--;\n            }\n\n            if (left &lt;= right) {\n                \/\/ \u5de6\u5217: \u4e0b\u304b\u3089\u4e0a\n                for (int i = bottom; i &gt;= top; i--) {\n                    System.out.print(array[i][left] + \" \");\n                }\n                left++;\n            }\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-74\">\n<h4 class=\"wp-block-heading\" id=\"i-28\">\u52b9\u7387\u7684\u306a\u51e6\u7406\u306e\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-75\">\n<p>1. <strong>\u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u8d70\u67fb\u9806\u5e8f<\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u884c\u512a\u5148\u30a2\u30af\u30bb\u30b9\uff08\u52b9\u7387\u7684\uff09\nfor (int i = 0; i &lt; rows; i++) {\n    for (int j = 0; j &lt; cols; j++) {\n        process(array[i][j]);\n    }\n}\n\n\/\/ \u5217\u512a\u5148\u30a2\u30af\u30bb\u30b9\uff08\u975e\u52b9\u7387\u7684\uff09\nfor (int j = 0; j &lt; cols; j++) {\n    for (int i = 0; i &lt; rows; i++) {\n        process(array[i][j]);\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-76\">\n<p>2. <strong><strong>\u5883\u754c\u30c1\u30a7\u30c3\u30af\u306e\u52b9\u7387\u5316<\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static boolean isValid(int[][] array, int row, int col) {\n    return row &gt;= 0 &amp;&amp; row &lt; array.length &amp;&amp; \n           col &gt;= 0 &amp;&amp; col &lt; array[0].length;\n}<\/pre>\n\n\n<div id=\"sgb-css-id-77\">\n<p>\u3053\u308c\u3089\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u30442\u6b21\u5143\u914d\u5217\u306e\u64cd\u4f5c\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-78\">\n<h2 class=\"wp-block-heading\" id=\"i-29\">\uff14\uff0e\u5b9f\u8df5\u7684\u306a\u4f7f\u7528\u4f8b\u3068\u5fdc\u7528<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-79\">\n<h3 class=\"wp-block-heading\" id=\"i-30\">4.1 \u884c\u5217\u6f14\u7b97\u3067\u306e\u6d3b\u7528\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-80\">\n<p>\u884c\u5217\u6f14\u7b97\u306f2\u6b21\u5143\u914d\u5217\u306e\u6700\u3082\u4e00\u822c\u7684\u306a\u5fdc\u7528\u4f8b\u306e1\u3064\u3067\u3059\u3002\u4ee5\u4e0b\u306b\u4e3b\u8981\u306a\u884c\u5217\u6f14\u7b97\u306e\u5b9f\u88c5\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class MatrixOperations {\n    \/\/ \u884c\u5217\u306e\u52a0\u7b97\n    public static int[][] add(int[][] a, int[][] b) {\n        if (a.length != b.length || a[0].length != b[0].length) {\n            throw new IllegalArgumentException(\"\u884c\u5217\u306e\u30b5\u30a4\u30ba\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\");\n        }\n\n        int rows = a.length;\n        int cols = a[0].length;\n        int[][] result = new int[rows][cols];\n\n        for (int i = 0; i &lt; rows; i++) {\n            for (int j = 0; j &lt; cols; j++) {\n                result[i][j] = a[i][j] + b[i][j];\n            }\n        }\n        return result;\n    }\n\n    \/\/ \u884c\u5217\u306e\u4e57\u7b97\n    public static int[][] multiply(int[][] a, int[][] b) {\n        if (a[0].length != b.length) {\n            throw new IllegalArgumentException(\"\u884c\u5217\u306e\u4e57\u7b97\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u307e\u305b\u3093\");\n        }\n\n        int rows = a.length;\n        int cols = b[0].length;\n        int[][] result = new int[rows][cols];\n\n        for (int i = 0; i &lt; rows; i++) {\n            for (int j = 0; j &lt; cols; j++) {\n                for (int k = 0; k &lt; b.length; k++) {\n                    result[i][j] += a[i][k] * b[k][j];\n                }\n            }\n        }\n        return result;\n    }\n\n    \/\/ \u884c\u5217\u306e\u8ee2\u7f6e\n    public static int[][] transpose(int[][] matrix) {\n        int rows = matrix.length;\n        int cols = matrix[0].length;\n        int[][] result = new int[cols][rows];\n\n        for (int i = 0; i &lt; rows; i++) {\n            for (int j = 0; j &lt; cols; j++) {\n                result[j][i] = matrix[i][j];\n            }\n        }\n        return result;\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-81\">\n<h3 class=\"wp-block-heading\" id=\"i-31\">4.2 \u30b2\u30fc\u30e0\u958b\u767a\u3067\u306e\u76e4\u9762\u7ba1\u7406\u3078\u306e\u5fdc\u7528<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-82\">\n<p>\u30b2\u30fc\u30e0\u958b\u767a\u3067\u306f\u30012\u6b21\u5143\u914d\u5217\u3092\u4f7f\u3063\u3066\u76e4\u9762\u72b6\u614b\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u4ee5\u4e0b\u306b\u7c21\u5358\u306a\u4e09\u76ee\u4e26\u3079\u30b2\u30fc\u30e0\u306e\u5b9f\u88c5\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class TicTacToe {\n    private char[][] board;\n    private char currentPlayer;\n\n    public TicTacToe() {\n        board = new char[3][3];\n        currentPlayer = 'X';\n        initializeBoard();\n    }\n\n    private void initializeBoard() {\n        for (int i = 0; i &lt; 3; i++) {\n            for (int j = 0; j &lt; 3; j++) {\n                board[i][j] = '-';\n            }\n        }\n    }\n\n    public boolean makeMove(int row, int col) {\n        if (row &lt; 0 || row &gt;= 3 || col &lt; 0 || col &gt;= 3 || \n            board[row][col] != '-') {\n            return false;\n        }\n\n        board[row][col] = currentPlayer;\n        currentPlayer = (currentPlayer == 'X') ? 'O' : 'X';\n        return true;\n    }\n\n    public boolean checkWin() {\n        \/\/ \u884c\u306e\u30c1\u30a7\u30c3\u30af\n        for (int i = 0; i &lt; 3; i++) {\n            if (board[i][0] != '-' &amp;&amp; \n                board[i][0] == board[i][1] &amp;&amp; \n                board[i][1] == board[i][2]) {\n                return true;\n            }\n        }\n\n        \/\/ \u5217\u306e\u30c1\u30a7\u30c3\u30af\n        for (int j = 0; j &lt; 3; j++) {\n            if (board[0][j] != '-' &amp;&amp; \n                board[0][j] == board[1][j] &amp;&amp; \n                board[1][j] == board[2][j]) {\n                return true;\n            }\n        }\n\n        \/\/ \u5bfe\u89d2\u7dda\u306e\u30c1\u30a7\u30c3\u30af\n        return (board[0][0] != '-' &amp;&amp; \n                board[0][0] == board[1][1] &amp;&amp; \n                board[1][1] == board[2][2]) ||\n               (board[0][2] != '-' &amp;&amp; \n                board[0][2] == board[1][1] &amp;&amp; \n                board[1][1] == board[2][0]);\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-83\">\n<h3 class=\"wp-block-heading\" id=\"i-32\">4.3 \u753b\u50cf\u51e6\u7406\u306b\u304a\u3051\u308b2\u6b21\u5143\u914d\u5217\u306e\u4f7f\u7528<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-84\">\n<p>\u753b\u50cf\u51e6\u7406\u3067\u306f\u3001\u30d4\u30af\u30bb\u30eb\u30c7\u30fc\u30bf\u30922\u6b21\u5143\u914d\u5217\u3068\u3057\u3066\u6271\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u57fa\u672c\u7684\u306a\u753b\u50cf\u51e6\u7406\u64cd\u4f5c\u306e\u5b9f\u88c5\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ImageProcessor {\n    \/\/ \u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u753b\u50cf\u306e2\u5024\u5316\u51e6\u7406\n    public static int[][] binarize(int[][] image, int threshold) {\n        int height = image.length;\n        int width = image[0].length;\n        int[][] result = new int[height][width];\n\n        for (int y = 0; y &lt; height; y++) {\n            for (int x = 0; x &lt; width; x++) {\n                result[y][x] = (image[y][x] &gt; threshold) ? 255 : 0;\n            }\n        }\n        return result;\n    }\n\n    \/\/ \u753b\u50cf\u306e\u5e73\u6ed1\u5316\u30d5\u30a3\u30eb\u30bf\uff083x3\uff09\n    public static int[][] smoothing(int[][] image) {\n        int height = image.length;\n        int width = image[0].length;\n        int[][] result = new int[height][width];\n\n        for (int y = 1; y &lt; height - 1; y++) {\n            for (int x = 1; x &lt; width - 1; x++) {\n                int sum = 0;\n                \/\/ 3x3\u306e\u8fd1\u508d\u753b\u7d20\u306e\u5e73\u5747\u3092\u8a08\u7b97\n                for (int dy = -1; dy &lt;= 1; dy++) {\n                    for (int dx = -1; dx &lt;= 1; dx++) {\n                        sum += image[y + dy][x + dx];\n                    }\n                }\n                result[y][x] = sum \/ 9;\n            }\n        }\n        return result;\n    }\n\n    \/\/ \u30a8\u30c3\u30b8\u691c\u51fa\uff08\u7c21\u6613\u7248\uff09\n    public static int[][] detectEdges(int[][] image) {\n        int height = image.length;\n        int width = image[0].length;\n        int[][] result = new int[height][width];\n\n        \/\/ \u6c34\u5e73\u65b9\u5411\u306e\u30a8\u30c3\u30b8\u3092\u691c\u51fa\n        for (int y = 1; y &lt; height - 1; y++) {\n            for (int x = 1; x &lt; width - 1; x++) {\n                int gx = image[y][x+1] - image[y][x-1];\n                int gy = image[y+1][x] - image[y-1][x];\n                result[y][x] = (int)Math.sqrt(gx*gx + gy*gy);\n            }\n        }\n        return result;\n    }\n\n    \/\/ \u753b\u50cf\u306e\u56de\u8ee2\uff0890\u5ea6\uff09\n    public static int[][] rotate90Degrees(int[][] image) {\n        int height = image.length;\n        int width = image[0].length;\n        int[][] result = new int[width][height];\n\n        for (int y = 0; y &lt; height; y++) {\n            for (int x = 0; x &lt; width; x++) {\n                result[x][height-1-y] = image[y][x];\n            }\n        }\n        return result;\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-85\">\n<p>\u3053\u308c\u3089\u306e\u5b9f\u88c5\u4f8b\u306f\u30012\u6b21\u5143\u914d\u5217\u306e\u5b9f\u8df5\u7684\u306a\u5fdc\u7528\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u5b9f\u969b\u306e\u958b\u767a\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u57fa\u672c\u7684\u306a\u64cd\u4f5c\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u3088\u308a\u8907\u96d1\u306a\u6a5f\u80fd\u3092\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-86\">\n<p>\u307e\u305f\u3001\u3053\u308c\u3089\u306e\u5b9f\u88c5\u306f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3088\u308a\u3082\u7406\u89e3\u306e\u3057\u3084\u3059\u3055\u3092\u91cd\u8996\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u5b9f\u969b\u306e\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3067\u306f\u3001\u4e26\u5217\u51e6\u7406\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u306e\u6700\u9069\u5316\u306a\u3069\u3092\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-87\">\n<h2 class=\"wp-block-heading\" id=\"i-33\">\uff15\uff0e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-88\">\n<h3 class=\"wp-block-heading\" id=\"i-34\">5.1 \u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u5b9f\u88c5\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-89\">\n<p>2\u6b21\u5143\u914d\u5217\u3092\u52b9\u7387\u7684\u306b\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30e1\u30e2\u30ea\u7ba1\u7406\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4e21\u9762\u3092\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-90\">\n<h4 class=\"wp-block-heading\" id=\"i-35\">\u30e1\u30e2\u30ea\u6700\u9069\u5316\u30c6\u30af\u30cb\u30c3\u30af<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-91\">\n<p>\u30001. <strong>\u9069\u5207\u306a\u30b5\u30a4\u30ba\u8a2d\u8a08<\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class MemoryOptimization {\n    \/\/ \u5fc5\u8981\u6700\u5c0f\u9650\u306e\u30b5\u30a4\u30ba\u3067\u914d\u5217\u3092\u521d\u671f\u5316\n    public static int[][] createOptimalArray(List&lt;List&lt;Integer&gt;&gt; data) {\n        \/\/ \u30c7\u30fc\u30bf\u306e\u5b9f\u969b\u306e\u30b5\u30a4\u30ba\u306b\u57fa\u3065\u3044\u3066\u914d\u5217\u3092\u4f5c\u6210\n        int rows = data.size();\n        int maxCols = data.stream()\n                         .mapToInt(List::size)\n                         .max()\n                         .orElse(0);\n\n        return new int[rows][maxCols];\n    }\n\n    \/\/ \u5927\u304d\u306a\u914d\u5217\u306e\u90e8\u5206\u914d\u5217\u3092\u6271\u3046\n    public static void processLargeArray(int[][] array, int blockSize) {\n        for (int i = 0; i &lt; array.length; i += blockSize) {\n            for (int j = 0; j &lt; array[0].length; j += blockSize) {\n                processBlock(array, i, j, blockSize);\n            }\n        }\n    }\n\n    private static void processBlock(int[][] array, int startI, \n                                   int startJ, int blockSize) {\n        int endI = Math.min(startI + blockSize, array.length);\n        int endJ = Math.min(startJ + blockSize, array[0].length);\n\n        for (int i = startI; i &lt; endI; i++) {\n            for (int j = startJ; j &lt; endJ; j++) {\n                \/\/ \u30d6\u30ed\u30c3\u30af\u5358\u4f4d\u3067\u306e\u51e6\u7406\n                array[i][j] = performOperation(array[i][j]);\n            }\n        }\n    }\n\n    private static int performOperation(int value) {\n        return value * 2; \/\/ \u4f8b\u3068\u3057\u3066\u306e\u64cd\u4f5c\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-92\">\n<h4 class=\"wp-block-heading\" id=\"i-36\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-93\">\n<p>\u30001. <strong><strong>\u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3<\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class CacheOptimization {\n    \/\/ \u52b9\u7387\u7684\u306a\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\uff08\u884c\u512a\u5148\uff09\n    public static void efficientAccess(int[][] array) {\n        int sum = 0;\n        for (int i = 0; i &lt; array.length; i++) {\n            for (int j = 0; j &lt; array[i].length; j++) {\n                sum += array[i][j];\n            }\n        }\n    }\n\n    \/\/ \u975e\u52b9\u7387\u7684\u306a\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\uff08\u5217\u512a\u5148\uff09- \u907f\u3051\u308b\u3079\u304d\n    public static void inefficientAccess(int[][] array) {\n        int sum = 0;\n        for (int j = 0; j &lt; array[0].length; j++) {\n            for (int i = 0; i &lt; array.length; i++) {\n                sum += array[i][j];\n            }\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-94\">\n<p>\u30002. <strong><strong><strong>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u76e3\u8996<\/strong><\/strong><\/strong><\/p>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class MemoryMonitor {\n    public static void printMemoryStatus() {\n        Runtime runtime = Runtime.getRuntime();\n        long totalMemory = runtime.totalMemory();\n        long freeMemory = runtime.freeMemory();\n        long usedMemory = totalMemory - freeMemory;\n\n        System.out.printf(\"\u4f7f\u7528\u30e1\u30e2\u30ea: %d MB%n\", usedMemory \/ (1024 * 1024));\n        System.out.printf(\"\u7a7a\u304d\u30e1\u30e2\u30ea: %d MB%n\", freeMemory \/ (1024 * 1024));\n        System.out.printf(\"\u5408\u8a08\u30e1\u30e2\u30ea: %d MB%n\", totalMemory \/ (1024 * 1024));\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-95\">\n<h3 class=\"wp-block-heading\" id=\"i-37\">5.2 \u3088\u304f\u3042\u308b\u30d0\u30b0\u3068\u56de\u907f\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-96\">\n<p>2\u6b21\u5143\u914d\u5217\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u3088\u304f\u767a\u751f\u3059\u308b\u30d0\u30b0\u3068\u305d\u306e\u56de\u907f\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-97\">\n<h4 class=\"wp-block-heading\" id=\"i-38\">1. \u914d\u5217\u306e\u5883\u754c\u30c1\u30a7\u30c3\u30af<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ArrayBoundsCheck {\n    public static boolean isValidIndex(int[][] array, int row, int col) {\n        \/\/ null \u30c1\u30a7\u30c3\u30af\u3092\u542b\u3080\u5b8c\u5168\u306a\u5883\u754c\u30c1\u30a7\u30c3\u30af\n        return array != null &amp;&amp; \n               row &gt;= 0 &amp;&amp; row &lt; array.length &amp;&amp;\n               array[row] != null &amp;&amp; \n               col &gt;= 0 &amp;&amp; col &lt; array[row].length;\n    }\n\n    public static int safeGetElement(int[][] array, int row, int col) {\n        if (!isValidIndex(array, row, col)) {\n            throw new IllegalArgumentException(\n                String.format(\"\u7121\u52b9\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9: [%d][%d]\", row, col));\n        }\n        return array[row][col];\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-98\">\n<h4 class=\"wp-block-heading\" id=\"i-39\">2. \u4e0d\u6b63\u306a\u521d\u671f\u5316\u306e\u9632\u6b62<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ArrayInitialization {\n    \/\/ \u5b89\u5168\u306a\u914d\u5217\u521d\u671f\u5316\n    public static int[][] createSafeArray(int rows, int cols) {\n        if (rows &lt;= 0 || cols &lt;= 0) {\n            throw new IllegalArgumentException(\n                \"\u914d\u5217\u306e\u30b5\u30a4\u30ba\u306f\u6b63\u306e\u5024\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\");\n        }\n\n        int[][] array = new int[rows][];\n        try {\n            for (int i = 0; i &lt; rows; i++) {\n                array[i] = new int[cols];\n            }\n        } catch (OutOfMemoryError e) {\n            throw new RuntimeException(\n                \"\u914d\u5217\u306e\u4f5c\u6210\u306b\u5fc5\u8981\u306a\u30e1\u30e2\u30ea\u304c\u4e0d\u8db3\u3057\u3066\u3044\u307e\u3059\", e);\n        }\n        return array;\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-99\">\n<h4 class=\"wp-block-heading\" id=\"i-40\">3. \u30b3\u30d4\u30fc\u3068\u53c2\u7167\u306e\u554f\u984c<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ArrayCopyUtils {\n    \/\/ \u30c7\u30a3\u30fc\u30d7\u30b3\u30d4\u30fc\u306e\u5b9f\u88c5\n    public static int[][] deepCopy(int[][] original) {\n        if (original == null) return null;\n\n        int[][] copy = new int[original.length][];\n        for (int i = 0; i &lt; original.length; i++) {\n            if (original[i] != null) {\n                copy[i] = Arrays.copyOf(original[i], original[i].length);\n            }\n        }\n        return copy;\n    }\n\n    \/\/ \u914d\u5217\u306e\u6bd4\u8f03\uff08\u5024\u306e\u6bd4\u8f03\uff09\n    public static boolean compareArrays(int[][] array1, int[][] array2) {\n        if (array1 == array2) return true;\n        if (array1 == null || array2 == null) return false;\n        if (array1.length != array2.length) return false;\n\n        for (int i = 0; i &lt; array1.length; i++) {\n            if (!Arrays.equals(array1[i], array2[i])) {\n                return false;\n            }\n        }\n        return true;\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-100\">\n<h4 class=\"wp-block-heading\" id=\"i-41\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-101\">\n<p>\u30001. \u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-102\">\n<p>\u3000\u3000\u25cf \u5fc5\u8981\u6700\u5c0f\u9650\u306e\u30b5\u30a4\u30ba\u3067\u521d\u671f\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-103\">\n<p>\u3000\u3000\u25cf \u4e0d\u8981\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u65e9\u671f\u89e3\u653e<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-104\">\n<p>\u3000\u3000\u25cf \u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u306e\u9632\u6b62<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-105\">\n<p id=\"block-63feefb7-f18d-473e-9a09-c360c770adca\">\u30002. \u51e6\u7406\u901f\u5ea6\u306e\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-106\">\n<p id=\"block-b9d50bad-eea6-4399-8d53-64ba1197172a\">\u3000\u3000\u25cf \u30ad\u30e3\u30c3\u30b7\u30e5\u30d5\u30ec\u30f3\u30c9\u30ea\u30fc\u306a\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-107\">\n<p id=\"block-cf382c5e-95ff-450d-8e1a-df87f5837c32\">\u3000\u3000\u25cf \u9069\u5207\u306a\u30eb\u30fc\u30d7\u69cb\u9020\u306e\u9078\u629e<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-108\">\n<p id=\"block-9478c9d9-bf1e-4c17-8a7c-57549a3e5778\">\u3000\u3000\u25cf \u4e0d\u8981\u306a\u8a08\u7b97\u306e\u524a\u6e1b<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-109\">\n<p id=\"block-63feefb7-f18d-473e-9a09-c360c770adca\">\u30003. \u30b3\u30fc\u30c9\u54c1\u8cea\u306e\u78ba\u4fdd<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-110\">\n<p id=\"block-b9d50bad-eea6-4399-8d53-64ba1197172a\">\u3000\u3000\u25cf \u9069\u5207\u306a\u4f8b\u5916\u51e6\u7406<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-111\">\n<p id=\"block-cf382c5e-95ff-450d-8e1a-df87f5837c32\">\u3000\u3000\u25cf \u5883\u754c\u6761\u4ef6\u306e\u30c1\u30a7\u30c3\u30af<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-112\">\n<p id=\"block-9478c9d9-bf1e-4c17-8a7c-57549a3e5778\">\u3000\u3000\u25cf \u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u7dad\u6301<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-113\">\n<p>\u3053\u308c\u3089\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u4fe1\u983c\u6027\u304c\u9ad8\u304f\u52b9\u7387\u7684\u306a2\u6b21\u5143\u914d\u5217\u306e\u5b9f\u88c5\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-114\">\n<h2 class=\"wp-block-heading\" id=\"i-42\">\uff16\uff0eJava 8\u4ee5\u964d\u3067\u306e2\u6b21\u5143\u914d\u5217\u64cd\u4f5c<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-115\">\n<h3 class=\"wp-block-heading\" id=\"i-43\">6.1 Stream API\u3092\u4f7f\u3063\u305f\u52b9\u7387\u7684\u306a\u51e6\u7406<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-116\">\n<p>Java 8\u4ee5\u964d\u3067\u306f\u3001Stream API\u3092\u4f7f\u7528\u3057\u30662\u6b21\u5143\u914d\u5217\u3092\u3088\u308a\u7c21\u6f54\u304b\u3064\u52b9\u7387\u7684\u306b\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-117\">\n<h4 class=\"wp-block-heading\" id=\"i-44\">\u914d\u5217\u306eStream\u5909\u63db\u3068\u51e6\u7406<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ModernArrayOperations {\n    \/\/ 2\u6b21\u5143\u914d\u5217\u306e\u8981\u7d20\u3092\u30b9\u30c8\u30ea\u30fc\u30e0\u3068\u3057\u3066\u51e6\u7406\n    public static int sumAll(int[][] array) {\n        return Arrays.stream(array)          \/\/ \u5916\u5074\u306e\u914d\u5217\u3092\u30b9\u30c8\u30ea\u30fc\u30e0\u5316\n              .flatMapToInt(Arrays::stream)  \/\/ \u5185\u5074\u306e\u914d\u5217\u3092\u5e73\u5766\u5316\n              .sum();                        \/\/ \u5408\u8a08\u3092\u8a08\u7b97\n    }\n\n    \/\/ \u6761\u4ef6\u306b\u5408\u3046\u8981\u7d20\u306e\u691c\u7d22\n    public static List&lt;Point&gt; findElements(int[][] array, int target) {\n        List&lt;Point&gt; positions = new ArrayList&lt;&gt;();\n        IntStream.range(0, array.length)\n                .forEach(i -&gt; \n                    IntStream.range(0, array[i].length)\n                            .filter(j -&gt; array[i][j] == target)\n                            .forEach(j -&gt; \n                                positions.add(new Point(i, j))));\n        return positions;\n    }\n\n    \/\/ \u4e26\u5217\u51e6\u7406\u306b\u3088\u308b\u9ad8\u901f\u306a\u8981\u7d20\u5909\u63db\n    public static int[][] transformParallel(int[][] array, \n                                          IntUnaryOperator transform) {\n        return Arrays.stream(array)\n                    .parallel()\n                    .map(row -&gt; Arrays.stream(row)\n                                    .parallel()\n                                    .map(transform)\n                                    .toArray())\n                    .toArray(int[][]::new);\n    }\n\n    \/\/ \u7d71\u8a08\u60c5\u5831\u306e\u8a08\u7b97\n    public static DoubleSummaryStatistics getStatistics(int[][] array) {\n        return Arrays.stream(array)\n                    .flatMapToInt(Arrays::stream)\n                    .mapToDouble(Integer::doubleValue)\n                    .summaryStatistics();\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-118\">\n<h4 class=\"wp-block-heading\" id=\"i-45\">\u30e9\u30e0\u30c0\u5f0f\u3092\u6d3b\u7528\u3057\u305f\u51e6\u7406<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class LambdaArrayProcessing {\n    \/\/ \u8981\u7d20\u3054\u3068\u306e\u51e6\u7406\u3092\u30e9\u30e0\u30c0\u3067\u5b9a\u7fa9\n    public static void processElements(int[][] array, \n                                     BiConsumer&lt;Integer, Integer&gt; processor) {\n        IntStream.range(0, array.length)\n                .forEach(i -&gt; \n                    IntStream.range(0, array[i].length)\n                            .forEach(j -&gt; processor.accept(i, j)));\n    }\n\n    \/\/ \u4f7f\u7528\u4f8b\n    public static void main(String[] args) {\n        int[][] array = {{1, 2}, {3, 4}};\n\n        \/\/ \u5404\u8981\u7d20\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u5024\u3092\u8868\u793a\n        processElements(array, (i, j) -&gt; \n            System.out.printf(\"array[%d][%d] = %d%n\", i, j, array[i][j]));\n\n        \/\/ \u6761\u4ef6\u306b\u57fa\u3065\u304f\u8981\u7d20\u306e\u66f4\u65b0\n        processElements(array, (i, j) -&gt; {\n            if (array[i][j] % 2 == 0) {\n                array[i][j] *= 2;\n            }\n        });\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-119\">\n<h3 class=\"wp-block-heading\" id=\"i-46\">6.2 \u30e2\u30c0\u30f3\u306a\u5b9f\u88c5\u30d1\u30bf\u30fc\u30f3\u3068\u4e8b\u4f8b<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-120\">\n<h4 class=\"wp-block-heading\" id=\"i-47\">Optional\u578b\u3092\u4f7f\u7528\u3057\u305f\u5b89\u5168\u306a\u5b9f\u88c5<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class SafeArrayOperations {\n    \/\/ \u5b89\u5168\u306a\u8981\u7d20\u53d6\u5f97\n    public static Optional&lt;Integer&gt; getElementSafely(int[][] array, \n                                                   int row, int col) {\n        return Optional.ofNullable(array)\n                      .filter(arr -&gt; row &gt;= 0 &amp;&amp; row &lt; arr.length)\n                      .filter(arr -&gt; col &gt;= 0 &amp;&amp; col &lt; arr[row].length)\n                      .map(arr -&gt; arr[row][col]);\n    }\n\n    \/\/ \u6700\u5927\u5024\u3092\u6301\u3064\u4f4d\u7f6e\u306e\u53d6\u5f97\n    public static Optional&lt;Point&gt; findMaxPosition(int[][] array) {\n        if (array == null || array.length == 0) return Optional.empty();\n\n        return IntStream.range(0, array.length)\n                       .boxed()\n                       .flatMap(i -&gt; IntStream.range(0, array[i].length)\n                                            .mapToObj(j -&gt; \n                                                new AbstractMap.SimpleEntry&lt;&gt;(\n                                                    new Point(i, j), \n                                                    array[i][j])))\n                       .max(Map.Entry.comparingByValue())\n                       .map(Map.Entry::getKey);\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-121\">\n<h4 class=\"wp-block-heading\" id=\"i-48\">\u95a2\u6570\u578b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f7f\u7528\u3057\u305f\u30ab\u30b9\u30bf\u30e0\u51e6\u7406<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class FunctionalArrayProcessing {\n    @FunctionalInterface\n    interface ArrayElementProcessor {\n        void process(int[][] array, int i, int j);\n    }\n\n    \/\/ \u30ab\u30b9\u30bf\u30e0\u51e6\u7406\u306e\u9069\u7528\n    public static void applyCustomProcess(int[][] array, \n                                        ArrayElementProcessor processor) {\n        IntStream.range(0, array.length)\n                .forEach(i -&gt; \n                    IntStream.range(0, array[i].length)\n                            .forEach(j -&gt; processor.process(array, i, j)));\n    }\n\n    \/\/ \u8907\u6570\u306e\u51e6\u7406\u306e\u5408\u6210\n    public static ArrayElementProcessor compose(\n            ArrayElementProcessor... processors) {\n        return (array, i, j) -&gt; {\n            for (ArrayElementProcessor processor : processors) {\n                processor.process(array, i, j);\n            }\n        };\n    }\n\n    \/\/ \u4f7f\u7528\u4f8b\n    public static void main(String[] args) {\n        int[][] array = {{1, 2}, {3, 4}};\n\n        \/\/ \u8907\u6570\u306e\u51e6\u7406\u3092\u5408\u6210\u3057\u3066\u9069\u7528\n        ArrayElementProcessor logging = \n            (arr, i, j) -&gt; System.out.printf(\n                \"Processing element [%d][%d] = %d%n\", i, j, arr[i][j]);\n        ArrayElementProcessor doubling = \n            (arr, i, j) -&gt; arr[i][j] *= 2;\n\n        applyCustomProcess(array, compose(logging, doubling));\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-122\">\n<h4 class=\"wp-block-heading\" id=\"i-49\">\u30e2\u30c0\u30f3\u306a\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u305f\u914d\u5217\u64cd\u4f5c\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ModernArrayUtils {\n    \/\/ \u914d\u5217\u306e\u5909\u63db\u3068\u53ce\u96c6\n    public static &lt;T&gt; List&lt;T&gt; collectElements(int[][] array, \n            BiFunction&lt;Integer, Integer, T&gt; mapper) {\n        return Arrays.stream(array)\n                    .flatMap(row -&gt; IntStream.range(0, row.length)\n                                           .mapToObj(j -&gt; mapper.apply(\n                                               Arrays.asList(array).indexOf(row), \n                                               j)))\n                    .collect(Collectors.toList());\n    }\n\n    \/\/ \u6761\u4ef6\u306b\u57fa\u3065\u304f\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3068\u5909\u63db\n    public static int[][] filterAndTransform(int[][] array, \n            Predicate&lt;Integer&gt; filter, \n            IntUnaryOperator transformer) {\n        return Arrays.stream(array)\n                    .map(row -&gt; Arrays.stream(row)\n                                    .filter(filter::test)\n                                    .map(transformer)\n                                    .toArray())\n                    .toArray(int[][]::new);\n    }\n\n    \/\/ \u975e\u540c\u671f\u51e6\u7406\u306b\u3088\u308b\u5927\u898f\u6a21\u914d\u5217\u306e\u51e6\u7406\n    public static CompletableFuture&lt;int[][]&gt; processArrayAsync(\n            int[][] array, \n            IntUnaryOperator transformer) {\n        return CompletableFuture.supplyAsync(() -&gt;\n            Arrays.stream(array)\n                  .parallel()\n                  .map(row -&gt; Arrays.stream(row)\n                                  .parallel()\n                                  .map(transformer)\n                                  .toArray())\n                  .toArray(int[][]::new));\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-123\">\n<p>\u3053\u308c\u3089\u306e\u30e2\u30c0\u30f3\u306a\u5b9f\u88c5\u30d1\u30bf\u30fc\u30f3\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u5ba3\u8a00\u7684\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u4e26\u5217\u51e6\u7406\u3084\u30ce\u30f3\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u51e6\u7406\u3092\u5bb9\u6613\u306b\u5b9f\u88c5\u3067\u304d\u308b\u305f\u3081\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3082\u671f\u5f85\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-124\">\n<h2 class=\"wp-block-heading\" id=\"i-50\">\uff17\uff0e\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-125\">\n<h3 class=\"wp-block-heading\" id=\"i-51\">7.1 NullPointerException\u306e\u9632\u304e\u65b9<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-126\">\n<p>2\u6b21\u5143\u914d\u5217\u3067\u306e<code>NullPointerException<\/code>\u306f\u6700\u3082\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc\u306e1\u3064\u3067\u3059\u3002\u3053\u308c\u3092\u52b9\u679c\u7684\u306b\u9632\u3050\u305f\u3081\u306e\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-127\">\n<h4 class=\"wp-block-heading\" id=\"i-52\">\u9632\u5fa1\u7684\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u5b9f\u88c5<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class NullPointerPrevention {\n    \/\/ null\u5b89\u5168\u306a\u914d\u5217\u30a2\u30af\u30bb\u30b9\n    public static class SafeArrayAccessor {\n        private final int[][] array;\n\n        public SafeArrayAccessor(int[][] array) {\n            this.array = array != null ? array : new int[0][0];\n        }\n\n        public Optional&lt;Integer&gt; get(int row, int col) {\n            if (isValidIndex(row, col)) {\n                return Optional.of(array[row][col]);\n            }\n            return Optional.empty();\n        }\n\n        public boolean isValidIndex(int row, int col) {\n            return array != null &amp;&amp; \n                   row &gt;= 0 &amp;&amp; row &lt; array.length &amp;&amp;\n                   array[row] != null &amp;&amp; \n                   col &gt;= 0 &amp;&amp; col &lt; array[row].length;\n        }\n    }\n\n    \/\/ null\u5b89\u5168\u306a\u914d\u5217\u64cd\u4f5c\n    public static class SafeArrayOperations {\n        \/\/ null\u8981\u7d20\u3092\u542b\u3080\u53ef\u80fd\u6027\u306e\u3042\u308b\u914d\u5217\u306e\u5b89\u5168\u306a\u521d\u671f\u5316\n        public static int[][] initializeArray(int[][] source) {\n            if (source == null) {\n                return new int[0][0];\n            }\n\n            int maxCols = Arrays.stream(source)\n                               .filter(Objects::nonNull)\n                               .mapToInt(row -&gt; row.length)\n                               .max()\n                               .orElse(0);\n\n            int[][] result = new int[source.length][maxCols];\n            for (int i = 0; i &lt; source.length; i++) {\n                if (source[i] != null) {\n                    System.arraycopy(source[i], 0, result[i], 0, \n                                   source[i].length);\n                }\n            }\n            return result;\n        }\n\n        \/\/ null\u5b89\u5168\u306a\u914d\u5217\u306e\u30b3\u30d4\u30fc\n        public static int[][] safeCopy(int[][] source) {\n            if (source == null) return new int[0][0];\n\n            return Arrays.stream(source)\n                        .map(row -&gt; row != null ? \n                             Arrays.copyOf(row, row.length) : \n                             new int[0])\n                        .toArray(int[][]::new);\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-128\">\n<h4 class=\"wp-block-heading\" id=\"i-53\">\u3088\u304f\u3042\u308bNullPointerException\u306e\u30b1\u30fc\u30b9\u3068\u5bfe\u7b56<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class CommonNPECases {\n    \/\/ \u914d\u5217\u521d\u671f\u5316\u6642\u306enull\u30c1\u30a7\u30c3\u30af\n    public static void example1() {\n        int[][] array = null;\n        \/\/ \u9593\u9055\u3063\u305f\u4f7f\u7528\u6cd5\n        try {\n            int length = array.length; \/\/ NullPointerException\n        } catch (NullPointerException e) {\n            System.out.println(\"\u914d\u5217\u304cnull\u3067\u3059\");\n        }\n\n        \/\/ \u6b63\u3057\u3044\u4f7f\u7528\u6cd5\n        int length = array != null ? array.length : 0;\n    }\n\n    \/\/ \u90e8\u5206\u914d\u5217\u306enull\u30c1\u30a7\u30c3\u30af\n    public static void example2() {\n        int[][] array = new int[3][];\n        \/\/ \u9593\u9055\u3063\u305f\u4f7f\u7528\u6cd5\n        try {\n            int value = array[0][0]; \/\/ NullPointerException\n        } catch (NullPointerException e) {\n            System.out.println(\"\u90e8\u5206\u914d\u5217\u304cnull\u3067\u3059\");\n        }\n\n        \/\/ \u6b63\u3057\u3044\u4f7f\u7528\u6cd5\n        if (array[0] != null) {\n            int value = array[0][0];\n        }\n    }\n\n    \/\/ StreamAPI\u3067\u306enull\u5b89\u5168\u306a\u51e6\u7406\n    public static int sumArray(int[][] array) {\n        return Optional.ofNullable(array)\n                      .map(arr -&gt; Arrays.stream(arr)\n                                      .filter(Objects::nonNull)\n                                      .flatMapToInt(Arrays::stream)\n                                      .sum())\n                      .orElse(0);\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-129\">\n<h3 class=\"wp-block-heading\" id=\"i-54\">7.2 ArrayIndexOutOfBoundsException\u306e\u56de\u907f\u65b9\u6cd5<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-130\">\n<p>\u914d\u5217\u306e\u5883\u754c\u5916\u30a2\u30af\u30bb\u30b9\u306f\u3001\u3082\u30461\u3064\u306e\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc\u3067\u3059\u3002\u3053\u308c\u3092\u52b9\u679c\u7684\u306b\u9632\u3050\u305f\u3081\u306e\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-131\">\n<h4 class=\"wp-block-heading\" id=\"i-55\">\u5b89\u5168\u306a\u914d\u5217\u30a2\u30af\u30bb\u30b9\u306e\u5b9f\u88c5<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class BoundsCheckUtils {\n    \/\/ \u5883\u754c\u30c1\u30a7\u30c3\u30af\u7528\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\n    public static class ArrayBoundsChecker {\n        private final int[][] array;\n\n        public ArrayBoundsChecker(int[][] array) {\n            this.array = array;\n        }\n\n        public boolean isInBounds(int row, int col) {\n            return array != null &amp;&amp;\n                   row &gt;= 0 &amp;&amp; row &lt; array.length &amp;&amp;\n                   array[row] != null &amp;&amp;\n                   col &gt;= 0 &amp;&amp; col &lt; array[row].length;\n        }\n\n        public Optional&lt;Integer&gt; getValueSafely(int row, int col) {\n            return isInBounds(row, col) ? \n                   Optional.of(array[row][col]) : \n                   Optional.empty();\n        }\n\n        public void setValueSafely(int row, int col, int value) {\n            if (isInBounds(row, col)) {\n                array[row][col] = value;\n            } else {\n                throw new IllegalArgumentException(\n                    String.format(\"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7bc4\u56f2\u5916: [%d][%d]\", row, col));\n            }\n        }\n    }\n\n    \/\/ \u5883\u754c\u30c1\u30a7\u30c3\u30af\u4ed8\u304d\u306e\u914d\u5217\u64cd\u4f5c\n    public static class SafeArrayOperator {\n        \/\/ \u5b89\u5168\u306a\u8981\u7d20\u30a2\u30af\u30bb\u30b9\n        public static int getValue(int[][] array, int row, int col, \n                                 int defaultValue) {\n            try {\n                return array[row][col];\n            } catch (ArrayIndexOutOfBoundsException | NullPointerException e) {\n                return defaultValue;\n            }\n        }\n\n        \/\/ \u5b89\u5168\u306a\u7bc4\u56f2\u3067\u306e\u53cd\u5fa9\u51e6\u7406\n        public static void iterateWithinBounds(int[][] array, \n                BiConsumer&lt;Integer, Integer&gt; operation) {\n            for (int i = 0; i &lt; array.length; i++) {\n                if (array[i] != null) {\n                    for (int j = 0; j &lt; array[i].length; j++) {\n                        operation.accept(i, j);\n                    }\n                }\n            }\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-132\">\n<h4 class=\"wp-block-heading\" id=\"i-56\">\u4e00\u822c\u7684\u306a\u5883\u754c\u30a8\u30e9\u30fc\u306e\u30b1\u30fc\u30b9\u3068\u5bfe\u7b56<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class CommonBoundsErrors {\n    \/\/ \u52d5\u7684\u30b5\u30a4\u30ba\u914d\u5217\u306e\u5b89\u5168\u306a\u51e6\u7406\n    public static class DynamicArrayHandler {\n        \/\/ \u914d\u5217\u306e\u62e1\u5f35\n        public static int[][] expandArray(int[][] array, \n                                        int newRows, int newCols) {\n            if (newRows &lt; array.length || newCols &lt; array[0].length) {\n                throw new IllegalArgumentException(\n                    \"\u65b0\u3057\u3044\u30b5\u30a4\u30ba\u306f\u73fe\u5728\u306e\u30b5\u30a4\u30ba\u3088\u308a\u5927\u304d\u304f\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\");\n            }\n\n            int[][] newArray = new int[newRows][newCols];\n            for (int i = 0; i &lt; array.length; i++) {\n                System.arraycopy(array[i], 0, newArray[i], 0, \n                               array[i].length);\n            }\n            return newArray;\n        }\n\n        \/\/ \u5b89\u5168\u306a\u90e8\u5206\u914d\u5217\u306e\u53d6\u5f97\n        public static int[][] getSubArray(int[][] array, \n                                        int startRow, int endRow,\n                                        int startCol, int endCol) {\n            if (startRow &lt; 0 || endRow &gt; array.length || \n                startCol &lt; 0 || endCol &gt; array[0].length ||\n                startRow &gt;= endRow || startCol &gt;= endCol) {\n                throw new IllegalArgumentException(\"\u7121\u52b9\u306a\u7bc4\u56f2\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f\");\n            }\n\n            int[][] result = new int[endRow - startRow][endCol - startCol];\n            for (int i = 0; i &lt; endRow - startRow; i++) {\n                System.arraycopy(array[startRow + i], startCol,\n                               result[i], 0, endCol - startCol);\n            }\n            return result;\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-133\">\n<h4 class=\"wp-block-heading\" id=\"i-57\">\u30a8\u30e9\u30fc\u56de\u5fa9\u3068\u30ed\u30b0\u8a18\u9332<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ErrorRecovery {\n    private static final Logger logger = \n        Logger.getLogger(ErrorRecovery.class.getName());\n\n    \/\/ \u30a8\u30e9\u30fc\u30ed\u30b0\u4ed8\u304d\u306e\u914d\u5217\u64cd\u4f5c\n    public static class LoggedArrayOperator {\n        \/\/ \u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u8a18\u9332\u3057\u306a\u304c\u3089\u5b89\u5168\u306b\u5024\u3092\u53d6\u5f97\n        public static Optional&lt;Integer&gt; getValueWithLogging(\n                int[][] array, int row, int col) {\n            try {\n                return Optional.of(array[row][col]);\n            } catch (ArrayIndexOutOfBoundsException e) {\n                logger.warning(String.format(\n                    \"\u914d\u5217\u306e\u5883\u754c\u5916\u30a2\u30af\u30bb\u30b9: [%d][%d]\", row, col));\n                return Optional.empty();\n            } catch (NullPointerException e) {\n                logger.warning(String.format(\n                    \"null\u914d\u5217\u3078\u306e\u30a2\u30af\u30bb\u30b9: [%d][%d]\", row, col));\n                return Optional.empty();\n            }\n        }\n\n        \/\/ \u30a8\u30e9\u30fc\u56de\u5fa9\u3092\u542b\u3080\u914d\u5217\u64cd\u4f5c\n        public static void processArrayWithRecovery(\n                int[][] array,\n                BiConsumer&lt;Integer, Integer&gt; operation) {\n            for (int i = 0; i &lt; array.length; i++) {\n                if (array[i] == null) {\n                    logger.warning(\"null\u884c\u3092\u691c\u51fa: \" + i);\n                    array[i] = new int[array[0].length];\n                    continue;\n                }\n                for (int j = 0; j &lt; array[i].length; j++) {\n                    try {\n                        operation.accept(i, j);\n                    } catch (Exception e) {\n                        logger.warning(String.format(\n                            \"\u51e6\u7406\u30a8\u30e9\u30fc [%d][%d]: %s\", \n                            i, j, e.getMessage()));\n                    }\n                }\n            }\n        }\n    }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-134\">\n<p>\u3053\u308c\u3089\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30af\u30e9\u30b9\u3068\u65b9\u6cd5\u3092\u9069\u5207\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u30012\u6b21\u5143\u914d\u5217\u64cd\u4f5c\u306b\u304a\u3051\u308b\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc\u3092\u52b9\u679c\u7684\u306b\u9632\u304e\u3001\u3088\u308a\u5805\u7262\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-135\">\n<h2 class=\"wp-block-heading\" id=\"i-58\">\u307e\u3068\u3081\uff1aJava 2\u6b21\u5143\u914d\u5217\u306e\u5b9f\u8df5\u7684\u6d3b\u7528\u306b\u5411\u3051\u3066<\/h2>\n<\/div>\n\n<div id=\"sgb-css-id-136\">\n<h3 class=\"wp-block-heading\" id=\"i-59\">\u672c\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u91cd\u8981\u30dd\u30a4\u30f3\u30c8<\/h3>\n<\/div>\n\n<div id=\"sgb-css-id-137\">\n<h4 class=\"wp-block-heading\" id=\"i-60\">1. \u57fa\u672c\u6982\u5ff5\u3068\u521d\u671f\u5316<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-138\">\n<p>\u3000\u25cf 2\u6b21\u5143\u914d\u5217\u306f\u884c\u3068\u5217\u3067\u69cb\u6210\u3055\u308c\u308b\u683c\u5b50\u72b6\u306e\u30c7\u30fc\u30bf\u69cb\u9020<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-139\">\n<p>\u3000\u25cf \u521d\u671f\u5316\u65b9\u6cd5\u306b\u306f\u76f4\u63a5\u521d\u671f\u5316\u3001new\u6f14\u7b97\u5b50\u306b\u3088\u308b\u521d\u671f\u5316\u3001\u52d5\u7684\u306a\u521d\u671f\u5316\u306a\u3069\u8907\u6570\u306e\u65b9\u6cd5\u304c\u5b58\u5728<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-140\">\n<p>\u3000\u25cf \u53ef\u5909\u9577\uff08\u30b8\u30e3\u30b0\u914d\u5217\uff09\u306e\u5b9f\u88c5\u306b\u3088\u308a\u3001\u67d4\u8edf\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u69cb\u7bc9\u304c\u53ef\u80fd<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-141\">\n<h4 class=\"wp-block-heading\" id=\"i-61\">2. \u52b9\u7387\u7684\u306a\u64cd\u4f5c\u65b9\u6cd5<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-142\">\n<p>\u3000\u25cf \u884c\u512a\u5148\u30a2\u30af\u30bb\u30b9\u306b\u3088\u308b\u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u306e\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-143\">\n<p>\u3000\u25cf \u591a\u91cd\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3057\u305f\u52b9\u7387\u7684\u306a\u8d70\u67fb<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-144\">\n<p>\u3000\u25cf Stream API\u3092\u6d3b\u7528\u3057\u305f\u30e2\u30c0\u30f3\u306a\u51e6\u7406\u65b9\u6cd5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-145\">\n<h4 class=\"wp-block-heading\" id=\"i-62\">3. \u5b9f\u8df5\u7684\u306a\u5fdc\u7528\u4f8b<\/h4>\n<\/div>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u4e3b\u8981\u306a\u5fdc\u7528\u5206\u91ce\u3068\u5b9f\u88c5\u4f8b\npublic class ArrayApplicationSummary {\n    \/\/ \u884c\u5217\u6f14\u7b97\n    public static int[][] matrixMultiplication(int[][] a, int[][] b) { ... }\n\n    \/\/ \u30b2\u30fc\u30e0\u958b\u767a\n    public static class GameBoard {\n        private int[][] board;\n        public void updateState() { ... }\n    }\n\n    \/\/ \u753b\u50cf\u51e6\u7406\n    public static int[][] imageProcessing(int[][] pixels) { ... }\n}<\/pre>\n\n\n<div id=\"sgb-css-id-146\">\n<h4 class=\"wp-block-heading\" id=\"i-63\">4. \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-147\">\n<p>\u3000\u25cf \u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-148\">\n<p>\u3000\u25cf \u30ad\u30e3\u30c3\u30b7\u30e5\u30d5\u30ec\u30f3\u30c9\u30ea\u30fc\u306a\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-149\">\n<p>\u3000\u25cf \u9069\u5207\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u9078\u629e<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-150\">\n<h4 class=\"wp-block-heading\" id=\"i-64\">5. \u30a8\u30e9\u30fc\u51e6\u7406\u3068\u30c7\u30d0\u30c3\u30b0<\/h4>\n<\/div>\n\n<div id=\"sgb-css-id-151\">\n<p>\u3000\u25cf NullPointerException\u306e\u9632\u6b62\u7b56<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-152\">\n<p>\u3000\u25cf \u5883\u754c\u30c1\u30a7\u30c3\u30af\u306b\u3088\u308bArrayIndexOutOfBoundsException\u306e\u56de\u907f<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-153\">\n<p>\u3000\u25cf \u9069\u5207\u306a\u30a8\u30e9\u30fc\u30ed\u30b0\u8a18\u9332\u3068\u56de\u5fa9\u51e6\u7406<\/p>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"i-65\">\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h3>\n\n\n<div id=\"sgb-css-id-154\">\n<p>\u2705 \u914d\u5217\u64cd\u4f5c\u306e\u57fa\u672c<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-155\">\n<p>\u3000\u25cf \u521d\u671f\u5316\u6642\u306e\u9069\u5207\u306a\u30b5\u30a4\u30ba\u8a2d\u5b9a<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-156\">\n<p>\u3000\u25cf null\u691c\u67fb\u306e\u5b9f\u65bd<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-157\">\n<p>\u3000\u25cf \u5883\u754c\u30c1\u30a7\u30c3\u30af\u306e\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-158\">\n<p>\u2705 \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-159\">\n<p>\u3000\u25cf \u30ad\u30e3\u30c3\u30b7\u30e5\u52b9\u7387\u306e\u8003\u616e<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-160\">\n<p>\u3000\u25cf \u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-161\">\n<p>\u3000\u25cf \u9069\u5207\u306a\u30eb\u30fc\u30d7\u69cb\u9020\u306e\u9078\u629e<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-162\">\n<p>\u2705 \u30a8\u30e9\u30fc\u51e6\u7406<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-163\">\n<p>\u3000\u25cf \u4f8b\u5916\u51e6\u7406\u306e\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-164\">\n<p>\u3000\u25cf \u30a8\u30e9\u30fc\u30ed\u30b0\u306e\u8a18\u9332<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-165\">\n<p>\u3000\u25cf \u30ea\u30ab\u30d0\u30ea\u30fc\u51e6\u7406\u306e\u6e96\u5099<\/p>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"i-66\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/h3>\n\n\n<div id=\"sgb-css-id-166\">\n<p>1. <strong>\u767a\u5c55\u7684\u306a\u5b66\u7fd2\u30c6\u30fc\u30de<\/strong><\/p>\n<\/div>\n\n<div id=\"sgb-css-id-167\">\n<p>\u3000\u25cf \u4e26\u5217\u51e6\u7406\u306b\u3088\u308b\u914d\u5217\u64cd\u4f5c\u306e\u6700\u9069\u5316<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-168\">\n<p>\u3000\u25cf \u3088\u308a\u8907\u96d1\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-169\">\n<p>\u3000\u25cf \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306e\u6d3b\u7528\u65b9\u6cd5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-170\">\n<p>2. <strong><strong>\u5b9f\u8df5\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30a2\u30a4\u30c7\u30a2<\/strong><\/strong><\/p>\n<\/div>\n\n<div id=\"sgb-css-id-171\">\n<p>\u3000\u25cf \u7c21\u5358\u306a\u753b\u50cf\u7de8\u96c6\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-172\">\n<p>\u3000\u25cf 2D\u30b2\u30fc\u30e0\u306e\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-173\">\n<p>\u3000\u25cf \u30c7\u30fc\u30bf\u5206\u6790\u30c4\u30fc\u30eb\u306e\u958b\u767a<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-174\">\n<p>3. <strong><strong><strong>\u3055\u3089\u306a\u308b\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9<\/strong><\/strong><\/strong><\/p>\n<\/div>\n\n<div id=\"sgb-css-id-175\">\n<p>\u3000\u25cf Java\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-176\">\n<p>\u3000\u25cf \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u5c02\u9580\u66f8<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-177\">\n<p>\u3000\u25cf \u30aa\u30f3\u30e9\u30a4\u30f3\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8ab2\u984c<\/p>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"i-67\">\u6700\u5f8c\u306b<\/h3>\n\n\n<div id=\"sgb-css-id-178\">\n<p>2\u6b21\u5143\u914d\u5217\u306f\u3001\u5358\u306b\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b\u624b\u6bb5\u4ee5\u4e0a\u306e\u53ef\u80fd\u6027\u3092\u79d8\u3081\u3066\u3044\u307e\u3059\u3002\u672c\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u6280\u8853\u3092\u57fa\u790e\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u767a\u5c55\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-179\">\n<p>\u3000\u25cf \u3088\u308a\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u7406\u89e3\u3068\u5b9f\u88c5<\/p>\n<\/div>\n\n<div id=\"sgb-css-id-180\">\n<p>\u3000\u25cf \u52b9\u7387\u7684\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u8a2d\u8a08<\/p>\n<\/div>\n\n\n<p>\u3000\u25cf \u5b9f\u8df5\u7684\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a<\/p>\n\n\n<div id=\"sgb-css-id-181\">\n<p>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e16\u754c\u3067\u306f\u3001\u57fa\u790e\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u7406\u89e3\u304c\u3001\u3088\u308a\u9ad8\u5ea6\u306a\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u308b\u529b\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u5185\u5bb9\u3092\u5b9f\u8df5\u306b\u6d3b\u304b\u3057\u3001\u3055\u3089\u306a\u308b\u6280\u8853\u5411\u4e0a\u306b\u3064\u306a\u3052\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3044\u3066\u30012\u6b21\u5143\u914d\u5217\u306f\u8868\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u6271\u3046\u4e0a\u3067\u975e\u5e38\u306b\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u7279\u306bJava\u3067\u306f\u3001\u30b2\u30fc\u30e0\u958b\u767a\u3001\u753b\u50cf\u51e6\u7406\u3001\u884c\u5217\u8a08\u7b97\u306a\u3069\u3001\u69d8\u3005\u306a\u5206\u91ce\u30672\u6b21\u5143\u914d\u5217\u304c\u6d3b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u672c\u8a18\u4e8b\u3067\u306f\u30012\u6b21\u5143 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2886,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,66],"tags":[],"class_list":{"0":"post-1114","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-java","8":"category-java-syntax"},"_links":{"self":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/1114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1114"}],"version-history":[{"count":11,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/1114\/revisions"}],"predecessor-version":[{"id":2903,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/1114\/revisions\/2903"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/media\/2886"}],"wp:attachment":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}