{"id":416,"date":"2026-03-07T09:19:02","date_gmt":"2026-03-07T00:19:02","guid":{"rendered":"https:\/\/i-third.org\/blog\/?p=416"},"modified":"2026-03-07T09:19:02","modified_gmt":"2026-03-07T00:19:02","slug":"%e3%80%90%e5%88%9d%e5%bf%83%e8%80%85%e5%bf%85%e8%a6%8b%e3%80%91java%e3%81%ae%e3%80%8c%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e3%80%8d%e3%82%92%e5%ae%8c%e5%85%a8%e3%83%9e%e3%82%b9%e3%82%bf%e3%83%bc","status":"publish","type":"post","link":"https:\/\/i-third.org\/blog\/?p=416","title":{"rendered":"\u3010\u521d\u5fc3\u8005\u5fc5\u898b\u3011Java\u306e\u300c\u30e1\u30bd\u30c3\u30c9\u300d\u3092\u5b8c\u5168\u30de\u30b9\u30bf\u30fc\uff01\u306a\u305c\u4fbf\u5229\uff1f\u3069\u3046\u66f8\u304f\uff1f\u73fe\u5834\u3067\u4f7f\u3048\u308b\u57fa\u790e\u77e5\u8b58\u3092\u4e38\u3054\u3068\u89e3\u8aac"},"content":{"rendered":"\n\n\n\n<p>\u300c\u30e1\u30bd\u30c3\u30c9\u3063\u3066\u3001\u305f\u3060\u306e\u51e6\u7406\u306e\u304b\u305f\u307e\u308a\u3067\u3057\u3087\uff1f\u300d\u2014\u2014\u305d\u3046\u601d\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<\/p>\n\n\n\n<p>\u5b9f\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3053\u306a\u305b\u308b\u304b\u3069\u3046\u304b\u3067\u3001<strong>\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u30fb\u4fee\u6b63\u306e\u3057\u3084\u3059\u3055\u30fb\u30c1\u30fc\u30e0\u3067\u306e\u958b\u767a\u52b9\u7387<\/strong>\u304c\u5287\u7684\u306b\u5909\u308f\u3063\u3066\u304d\u307e\u3059\u3002\u30d7\u30ed\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u300c\u30e1\u30bd\u30c3\u30c9\u8a2d\u8a08\u304c\u5927\u4e8b\u300d\u3068\u53e3\u3092\u305d\u308d\u3048\u308b\u7406\u7531\u306f\u3001\u307e\u3055\u306b\u3053\u3053\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001IT\u7814\u4fee\u306e\u73fe\u5834\u3067\u521d\u5b66\u8005\u306b\u7e70\u308a\u8fd4\u3057\u4f1d\u3048\u3066\u304d\u305f\u8996\u70b9\u3092\u3082\u3068\u306b\u3001<strong>\u300c\u306a\u305c\u30e1\u30bd\u30c3\u30c9\u304c\u5fc5\u8981\u306a\u306e\u304b\u300d\u300cJava\u3067\u306e\u5177\u4f53\u7684\u306a\u66f8\u304d\u65b9\u300d\u300c\u73fe\u5834\u3067\u6c17\u3092\u3064\u3051\u305f\u3044\u30dd\u30a4\u30f3\u30c8\u300d<\/strong>\u307e\u3067\u3001\u3066\u3044\u306d\u3044\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u4f8b\u3082\u305f\u3063\u3077\u308a\u7528\u610f\u3057\u305f\u306e\u3067\u3001\u305c\u3072\u624b\u3092\u52d5\u304b\u3057\u306a\u304c\u3089\u8aad\u307f\u9032\u3081\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\" id=\"toc\">\u76ee\u6b21<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n  <li><a href=\"#section1\">\uff11\uff0e\u30e1\u30bd\u30c3\u30c9\u3063\u3066\u4f55\u304c\u4fbf\u5229\u306a\u306e\uff1f<\/a>\n    <ul>\n      <li><a href=\"#section1-1\">\u2460\u51e6\u7406\u3092\u300c\u518d\u5229\u7528\u3067\u304d\u308b\u90e8\u54c1\u300d\u3068\u3057\u3066\u307e\u3068\u3081\u3089\u308c\u308b<\/a><\/li>\n      <li><a href=\"#section1-2\">\u2461\u300c\u5165\u53e3\u3068\u51fa\u53e3\u300d\u304c\u660e\u78ba\u306b\u306a\u308a\u3001\u51e6\u7406\u306e\u6d41\u308c\u304c\u8aad\u307f\u3084\u3059\u304f\u306a\u308b<\/a><\/li>\n      <li><a href=\"#section1-3\">\u2462\u6a5f\u80fd\u3092\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u4fdd\u5b88\u30fb\u4fee\u6b63\u30fb\u30c1\u30fc\u30e0\u958b\u767a\u304c\u697d\u306b\u306a\u308b<\/a><\/li>\n    <\/ul>\n  <\/li>\n  <li><a href=\"#section2\">\uff12\uff0eJava\u8a00\u8a9e\u3067\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u5229\u7528\u65b9\u6cd5\u306f\uff1f<\/a>\n    <ul>\n      <li><a href=\"#section2-1\">\u2460\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9\u65b9\u6cd5\uff1a\u57fa\u672c\u69cb\u6587\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046<\/a><\/li>\n      <li><a href=\"#section2-2\">\u2461\u5f15\u6570\uff08\u5b9f\u5f15\u6570\u30fb\u4eee\u5f15\u6570\uff09\u3068\u623b\u308a\u5024\uff08return\u6587\uff09\u306e\u5f79\u5272\u3068\u66f8\u304d\u65b9<\/a><\/li>\n      <li><a href=\"#section2-3\">\u2462void\u30e1\u30bd\u30c3\u30c9\u3068\u5024\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u5206\u3051\u30fbstatic\u306e\u610f\u5473<\/a><\/li>\n    <\/ul>\n  <\/li>\n  <li><a href=\"#section3\">\uff13\uff0e\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u6574\u7406\u3057\u3066\u304a\u304d\u305f\u3044\u3053\u3068<\/a>\n    <ul>\n      <li><a href=\"#section3-1\">\u2460\u5b9f\u5f15\u6570\u3068\u4eee\u5f15\u6570\u306e\u95a2\u4fc2\uff0f\u5024\u6e21\u3057\u3068\u53c2\u7167\u6e21\u3057\u306e\u9055\u3044<\/a><\/li>\n      <li><a href=\"#section3-2\">\u2461return\u6587\u306f1\u3064\u306b\u307e\u3068\u3081\u308b\uff08\u69cb\u9020\u5316\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u539f\u5247\uff09<\/a><\/li>\n      <li><a href=\"#section3-3\">\u2462\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u547d\u540d\u898f\u7d04\u3068\u3001\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u8a2d\u8a08\u306e\u30b3\u30c4<\/a><\/li>\n    <\/ul>\n  <\/li>\n  <li><a href=\"#summary\">\u307e\u3068\u3081<\/a><\/li>\n<\/ul>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\" id=\"section1\">\uff11\uff0e\u30e1\u30bd\u30c3\u30c9\u3063\u3066\u4f55\u304c\u4fbf\u5229\u306a\u306e\uff1f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section1-1\">\u2460\u51e6\u7406\u3092\u300c\u518d\u5229\u7528\u3067\u304d\u308b\u90e8\u54c1\u300d\u3068\u3057\u3066\u307e\u3068\u3081\u3089\u308c\u308b<\/h3>\n\n\n\n<p>\u307e\u305a\u4e00\u756a\u30b7\u30f3\u30d7\u30eb\u306a\u4fbf\u5229\u3055\u304b\u3089\u3002<strong>\u30e1\u30bd\u30c3\u30c9\u306f\u300c\u51e6\u7406\u3092\u3072\u3068\u307e\u3068\u3081\u306b\u3057\u3066\u3001\u4f55\u5ea6\u3067\u3082\u547c\u3073\u51fa\u305b\u308b\u90e8\u54c1\u300d<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u3001\u5272\u5f15\u4fa1\u683c\u3092\u8a08\u7b97\u3059\u308b\u51e6\u7406\u304c\u8907\u6570\u306e\u5834\u6240\u3067\u5fc5\u8981\u306b\u306a\u3063\u305f\u3068\u3057\u307e\u3059\u3002\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u308f\u306a\u3044\u3068\u3001\u540c\u3058\u8a08\u7b97\u5f0f\u3092\u3042\u3061\u3053\u3061\u306b\u30b3\u30d4\u30fc\u3057\u3066\u66f8\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u3067\u3082\u305d\u308c\u3060\u3068\u3001\u7a0e\u7387\u304c\u5909\u308f\u3063\u305f\u3068\u304d\u306b\u5168\u90e8\u63a2\u3057\u3066\u76f4\u3055\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u2026\u3068\u3066\u3082\u5927\u5909\u3067\u3059\u3088\u306d\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u274c \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\uff08\u540c\u3058\u8a08\u7b97\u304c\u6563\u3089\u3070\u308b\uff09\ndouble price1 = 24800 * 0.7;\ndouble price2 = 15000 * 0.7;\ndouble price3 = 8000  * 0.7;\n\/\/ \u5272\u5f15\u7387\u3092\u5909\u3048\u305f\u3044\u3068\u304d\u3001\u5168\u884c\u3092\u4fee\u6b63\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u2026\n\n\/\/ \u2705 \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5834\u5408\uff08\u4e00\u304b\u6240\u3092\u76f4\u3059\u3060\u3051\u3067OK\uff09\nstatic double calcDiscountPrice(int originalPrice, double rate) {\n    return originalPrice * rate;\n}\n\n\/\/ \u547c\u3073\u51fa\u3057\ndouble price1 = calcDiscountPrice(24800, 0.7);\ndouble price2 = calcDiscountPrice(15000, 0.7);\ndouble price3 = calcDiscountPrice(8000,  0.7);<\/code><\/pre>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u3067\u3001<strong>\u4fee\u6b63\u306f1\u304b\u6240\u3060\u3051<\/strong>\u3002\u30b3\u30fc\u30c9\u306e\u300c\u90e8\u54c1\u5316\u300d\u304c\u3067\u304d\u308b\u3068\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u54c1\u8cea\u304c\u3050\u3063\u3068\u4e0a\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section1-2\">\u2461\u300c\u5165\u53e3\u3068\u51fa\u53e3\u300d\u304c\u660e\u78ba\u306b\u306a\u308a\u3001\u51e6\u7406\u306e\u6d41\u308c\u304c\u8aad\u307f\u3084\u3059\u304f\u306a\u308b<\/h3>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u306b\u306f<strong>\u300c\u5165\u53e3\uff08\u5f15\u6570\uff09\u300d\u3068\u300c\u51fa\u53e3\uff08\u623b\u308a\u5024\uff09\u300d<\/strong>\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u8a2d\u8a08\u601d\u60f3\u304c\u3068\u3066\u3082\u5927\u5207\u3067\u3001\u51e6\u7406\u306e\u76ee\u7684\u3068\u6d41\u308c\u3092\u4e00\u76ee\u3067\u308f\u304b\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6599\u7406\u306b\u4f8b\u3048\u308b\u3068\u2014\u2014\u300c\u6750\u6599\u3092\u6e21\u3059\uff08\u5f15\u6570\uff09\u2192 \u30b7\u30a7\u30d5\u304c\u8abf\u7406\u3059\u308b\uff08\u30e1\u30bd\u30c3\u30c9\u306e\u51e6\u7406\uff09\u2192 \u6599\u7406\u304c\u51fa\u3066\u304f\u308b\uff08\u623b\u308a\u5024\uff09\u300d\u3068\u3044\u3046\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\u30b7\u30a7\u30d5\u306e\u4e2d\u8eab\uff08\u30ec\u30b7\u30d4\uff09\u3092\u77e5\u3089\u306a\u304f\u3066\u3082\u3001\u6750\u6599\u3092\u6e21\u305b\u3070\u6599\u7406\u304c\u8fd4\u3063\u3066\u304f\u308b\u3002\u305d\u308c\u304c\u30e1\u30bd\u30c3\u30c9\u306e\u672c\u8cea\u3067\u3059\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u300c\u5165\u529b\u5024\u30922\u4e57\u3059\u308b\u300d\u30e1\u30bd\u30c3\u30c9\nstatic int pow2(int src) {\n    return src * src;\n}\n\n\/\/ \u4f7f\u3046\u5074\u306f\u30b7\u30f3\u30d7\u30eb\nint result = pow2(3);   \/\/ 3\u3092\u6e21\u3059 \u2192 9\u304c\u8fd4\u3063\u3066\u304f\u308b\nSystem.out.println(result);  \/\/ \u2192 9<\/code><\/pre>\n\n\n\n<p><code>pow2(3)<\/code> \u3092\u8aad\u3080\u3060\u3051\u3067\u300c3\u30922\u4e57\u3059\u308b\u3093\u3060\u306a\u300d\u3068\u3059\u3050\u308f\u304b\u308a\u307e\u3059\u3088\u306d\u3002\u3053\u308c\u304c\u30e1\u30bd\u30c3\u30c9\u304c\u300c\u8aad\u307f\u3084\u3059\u3055\u300d\u3092\u751f\u3080\u7406\u7531\u3067\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section1-3\">\u2462\u6a5f\u80fd\u3092\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u4fdd\u5b88\u30fb\u4fee\u6b63\u30fb\u30c1\u30fc\u30e0\u958b\u767a\u304c\u697d\u306b\u306a\u308b<\/h3>\n\n\n\n<p>\u5927\u304d\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u30921\u3064\u306e\u30e1\u30bd\u30c3\u30c9\uff08main\u30e1\u30bd\u30c3\u30c9\uff09\u306b\u5168\u90e8\u66f8\u3044\u3066\u3057\u307e\u3046\u3068\u3001\u3069\u3053\u306b\u4f55\u306e\u51e6\u7406\u304c\u3042\u308b\u304b\u308f\u304b\u3089\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u300c\u30b9\u30d1\u30b2\u30c3\u30c6\u30a3\u30b3\u30fc\u30c9\u300d\u3068\u547c\u3070\u308c\u308b\u60aa\u3044\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u3067\u6a5f\u80fd\u3092\u5206\u5272\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u751f\u307e\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n  <li>\u2705 <strong>\u30d0\u30b0\u306e\u5834\u6240\u3092\u7279\u5b9a\u3057\u3084\u3059\u3044<\/strong>\uff08\u3069\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u554f\u984c\u304c\u8d77\u304d\u3066\u3044\u308b\u304b\u304c\u308f\u304b\u308b\uff09<\/li>\n  <li>\u2705 <strong>\u30c1\u30fc\u30e0\u3067\u62c5\u5f53\u3092\u5206\u3051\u3084\u3059\u3044<\/strong>\uff08A\u3055\u3093\u306f\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3001B\u3055\u3093\u306f\u3042\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u62c5\u5f53\uff09<\/li>\n  <li>\u2705 <strong>\u30c6\u30b9\u30c8\u3057\u3084\u3059\u3044<\/strong>\uff08\u30e1\u30bd\u30c3\u30c9\u5358\u4f4d\u3067\u52d5\u4f5c\u78ba\u8a8d\u3067\u304d\u308b\uff09<\/li>\n<\/ul>\n\n\n\n<pre><code>\/\/ main\u30e1\u30bd\u30c3\u30c9\u304c\u3059\u3063\u304d\u308a\uff01 \u4f55\u3092\u3057\u3066\u3044\u308b\u304b\u4e00\u76ee\u3067\u308f\u304b\u308b\npublic static void main(String[] args) {\n    dispHeader(\"\u6210\u7e3e\u8868\");          \/\/ \u2460\u30d8\u30c3\u30c0\u30fc\u8868\u793a\n    String msg = judge(75);        \/\/ \u2461\u70b9\u6570\u5224\u5b9a\n    dispResult(msg);               \/\/ \u2462\u7d50\u679c\u8868\u793a\n    dispFooter();                  \/\/ \u2463\u30d5\u30c3\u30bf\u30fc\u8868\u793a\n}<\/code><\/pre>\n\n\n\n<p>main\u30e1\u30bd\u30c3\u30c9\u304c\u300c\u76ee\u6b21\u300d\u306e\u3088\u3046\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u3066\u3044\u307e\u3059\u306d\u3002<strong>\u51e6\u7406\u306e\u6d41\u308c\u304c\u4e0a\u304b\u3089\u4e0b\u3078\u8aad\u3081\u308b\u30b3\u30fc\u30c9<\/strong>\u2014\u2014\u3053\u308c\u304c\u30e1\u30bd\u30c3\u30c9\u5206\u5272\u306e\u7406\u60f3\u5f62\u3067\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\" id=\"section2\">\uff12\uff0eJava\u8a00\u8a9e\u3067\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u5229\u7528\u65b9\u6cd5\u306f\uff1f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section2-1\">\u2460\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9\u65b9\u6cd5\uff1a\u57fa\u672c\u69cb\u6587\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046<\/h3>\n\n\n\n<p>Java\u3067\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306e\u57fa\u672c\u69cb\u6587\u306f\u3053\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<pre><code>static \u623b\u308a\u5024\u306e\u578b \u30e1\u30bd\u30c3\u30c9\u540d(\u5f15\u6570\u306e\u578b \u5f15\u6570\u540d, ...) {\n    \/\/ \u51e6\u7406\u5185\u5bb9\n    return \u623b\u308a\u5024;\n}<\/code><\/pre>\n\n\n\n<p>\u5404\u30d1\u30fc\u30c4\u306e\u610f\u5473\u3092\u6574\u7406\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table>\n  <thead>\n    <tr>\n      <th>\u30d1\u30fc\u30c4<\/th>\n      <th>\u5f79\u5272<\/th>\n      <th>\u4f8b<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr><td><code>static<\/code><\/td><td>main\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u5fc5\u8981\u306a\u4fee\u98fe\u5b50<\/td><td><code>static<\/code><\/td><\/tr>\n    <tr><td>\u623b\u308a\u5024\u306e\u578b<\/td><td>\u30e1\u30bd\u30c3\u30c9\u304c\u8fd4\u3059\u30c7\u30fc\u30bf\u306e\u578b<\/td><td><code>int<\/code>, <code>double<\/code>, <code>String<\/code>, <code>void<\/code><\/td><\/tr>\n    <tr><td>\u30e1\u30bd\u30c3\u30c9\u540d<\/td><td>\u51e6\u7406\u306e\u540d\u524d\uff08\u52d5\u8a5e\u59cb\u307e\u308a\u304c\u539f\u5247\uff09<\/td><td><code>calcPrice<\/code>, <code>judge<\/code><\/td><\/tr>\n    <tr><td>\u5f15\u6570<\/td><td>\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3059\u5165\u529b\u30c7\u30fc\u30bf<\/td><td><code>int score<\/code>, <code>double rate<\/code><\/td><\/tr>\n    <tr><td><code>return<\/code><\/td><td>\u547c\u3073\u51fa\u3057\u5143\u306b\u5024\u3092\u8fd4\u3059\u547d\u4ee4<\/td><td><code>return result;<\/code><\/td><\/tr>\n  <\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u5b9a\u4fa1\u3068\u5272\u5f15\u7387\u3092\u53d7\u3051\u53d6\u3063\u3066\u3001\u5272\u5f15\u5f8c\u306e\u4fa1\u683c\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<pre><code>class TestShop {\n    public static void main(String[] args) {\n        int price = 24800;     \/\/ \u5b9a\u4fa1\n        double rate = 0.7;     \/\/ \u5272\u5f15\u7387\n\n        \/\/ calc()\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3073\u51fa\u3057\n        double ret = calc(price, rate);\n        System.out.println(\"\u5272\u5f15\u5f8c\u306e\u4fa1\u683c\u306f\" + ret + \"\u3067\u3059\u3002\");\n    }\n\n    static double calc(int yen, double rate) {\n        double result;\n        result = yen * rate;\n        return result;\n    }\n}<\/code><\/pre>\n\n\n\n<p><code>main<\/code> \u30e1\u30bd\u30c3\u30c9\u304b\u3089 <code>calc()<\/code> \u3092\u547c\u3073\u51fa\u3057\u3001\u623b\u308a\u5024\u3092\u5909\u6570 <code>ret<\/code> \u3067\u53d7\u3051\u53d6\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u300c\u547c\u3073\u51fa\u3059\u2192\u51e6\u7406\u2192\u53d7\u3051\u53d6\u308b\u300d\u306e\u6d41\u308c\u3092\u4f53\u3067\u899a\u3048\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section2-2\">\u2461\u5f15\u6570\uff08\u5b9f\u5f15\u6570\u30fb\u4eee\u5f15\u6570\uff09\u3068\u623b\u308a\u5024\uff08return\u6587\uff09\u306e\u5f79\u5272\u3068\u66f8\u304d\u65b9<\/h3>\n\n\n\n<p>\u5f15\u6570\u306b\u306f<strong>\u300c\u5b9f\u5f15\u6570\u300d\u3068\u300c\u4eee\u5f15\u6570\u300d<\/strong>\u3068\u3044\u30462\u3064\u306e\u8a00\u8449\u304c\u3042\u308a\u307e\u3059\u3002\u6df7\u4e71\u3057\u3084\u3059\u3044\u306e\u3067\u6574\u7406\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table>\n  <thead>\n    <tr>\n      <th>\u7528\u8a9e<\/th>\n      <th>\u610f\u5473<\/th>\n      <th>\u5834\u6240<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><strong>\u5b9f\u5f15\u6570\uff08\u30a2\u30fc\u30ae\u30e5\u30e1\u30f3\u30c8\uff09<\/strong><\/td>\n      <td>\u30e1\u30bd\u30c3\u30c9\u3092<strong>\u547c\u3073\u51fa\u3059\u3068\u304d<\/strong>\u306b\u6e21\u3059\u5024<\/td>\n      <td>\u547c\u3073\u51fa\u3057\u5143\uff08main\u30e1\u30bd\u30c3\u30c9\u306a\u3069\uff09<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>\u4eee\u5f15\u6570\uff08\u30d1\u30e9\u30e1\u30fc\u30bf\uff09<\/strong><\/td>\n      <td>\u30e1\u30bd\u30c3\u30c9\u3092<strong>\u5b9a\u7fa9\u3059\u308b\u3068\u304d<\/strong>\u306b\u53d7\u3051\u53d6\u308b\u5909\u6570<\/td>\n      <td>\u30e1\u30bd\u30c3\u30c9\u5ba3\u8a00\u90e8\u5206<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<pre><code>\/\/ \u547c\u3073\u51fa\u3057\u5143\uff1anum \u304c\u300c\u5b9f\u5f15\u6570\u300d\nint num = 4;\npow2(num);   \/\/ \u2190 num\u306e\u5024(4)\u304cpow2\u30e1\u30bd\u30c3\u30c9\u3078\u6e21\u3055\u308c\u308b\n\n\/\/ \u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9\uff1asrc \u304c\u300c\u4eee\u5f15\u6570\u300d\nstatic int pow2(int src) {   \/\/ \u2190 src\u306b4\u304c\u30b3\u30d4\u30fc\u3055\u308c\u308b\n    return src * src;\n}<\/code><\/pre>\n\n\n\n<p>\u5927\u4e8b\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u3001<strong>\u5b9f\u5f15\u6570\u3068\u4eee\u5f15\u6570\u306f\u5909\u6570\u540d\u304c\u9055\u3063\u3066\u3082\u554f\u984c\u306a\u3044<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff08\u4e0a\u306e\u4f8b\u3067\u306f <code>num<\/code> \u3068 <code>src<\/code>\uff09\u3002\u5024\u304c\u30b3\u30d4\u30fc\u3055\u308c\u308b\u306e\u3067\u3042\u3063\u3066\u3001\u5909\u6570\u540d\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001<strong>\u623b\u308a\u5024\u306f <code>return<\/code> \u6587\u3067\u8fd4\u3057\u307e\u3059<\/strong>\u3002\u5f15\u6570\u306f\u8907\u6570\u6e21\u305b\u307e\u3059\u304c\u3001\u623b\u308a\u5024\u306f <strong>0\u500b\uff08void\uff09\u304b1\u500b\u3060\u3051<\/strong> \u3068\u3044\u3046\u30eb\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u5f15\u6570\u306f\u8907\u6570OK\nstatic double calc(int yen, double rate) {\n    return yen * rate;   \/\/ \u623b\u308a\u5024\u306f1\u3064\u3060\u3051\n}\n\n\/\/ \u623b\u308a\u5024\u306a\u3057\uff08void\uff09\u3082\u53ef\nstatic void showMessage(String msg) {\n    System.out.println(msg);\n    \/\/ return\u306f\u4e0d\u8981\uff08\u307e\u305f\u306f return; \u3060\u3051\u66f8\u304f\uff09\n}<\/code><\/pre>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section2-3\">\u2462void\u30e1\u30bd\u30c3\u30c9\u3068\u5024\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u5206\u3051\u30fbstatic\u306e\u610f\u5473<\/h3>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u5927\u304d\u304f2\u7a2e\u985e\u3042\u308a\u307e\u3059\u3002<strong>\u300c\u5024\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u300d\u3068\u300c\u5024\u3092\u8fd4\u3055\u306a\u3044\u30e1\u30bd\u30c3\u30c9\uff08void\u30e1\u30bd\u30c3\u30c9\uff09\u300d<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table>\n  <thead>\n    <tr>\n      <th>\u7a2e\u985e<\/th>\n      <th>\u623b\u308a\u5024\u306e\u578b<\/th>\n      <th>\u4f7f\u3044\u3069\u3053\u308d<\/th>\n      <th>\u4f8b<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><strong>\u5024\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9<\/strong><\/td>\n      <td><code>int<\/code>, <code>double<\/code>, <code>String<\/code>\u306a\u3069<\/td>\n      <td>\u8a08\u7b97\u7d50\u679c\u3084\u5224\u5b9a\u7d50\u679c\u3092\u547c\u3073\u51fa\u3057\u5143\u3067\u4f7f\u3044\u305f\u3044\u3068\u304d<\/td>\n      <td>\u5272\u5f15\u4fa1\u683c\u306e\u8a08\u7b97\u3001\u5408\u5426\u5224\u5b9a<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>void\u30e1\u30bd\u30c3\u30c9<\/strong><\/td>\n      <td><code>void<\/code><\/td>\n      <td>\u753b\u9762\u8868\u793a\u306a\u3069\u3001\u51e6\u7406\u3059\u308b\u3060\u3051\u3067\u7d50\u679c\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u306a\u3044\u3068\u304d<\/td>\n      <td>\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u306e\u8868\u793a<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<pre><code>\/\/ \u2705 \u5024\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\uff08\u623b\u308a\u5024\u3042\u308a\uff09\nstatic String judge(int score) {\n    String message;\n    if (score >= 90) {\n        message = \"\u512a\u79c0\u8cde\";\n    } else if (score >= 60) {\n        message = \"\u5408\u683c\";\n    } else {\n        message = \"\u518d\u8a66\u9a13\";\n    }\n    return message;   \/\/ \u6587\u5b57\u5217\u3092\u8fd4\u3059\n}\n\n\/\/ \u2705 void\u30e1\u30bd\u30c3\u30c9\uff08\u623b\u308a\u5024\u306a\u3057\uff09\nstatic void dispResult(String msg) {\n    System.out.println(\"\u5224\u5b9a\u7d50\u679c\uff1a\" + msg);\n    \/\/ return \u306f\u4e0d\u8981\n}<\/code><\/pre>\n\n\n\n<p>\u307e\u305f\u3001<code>static<\/code> \u4fee\u98fe\u5b50\u306b\u3064\u3044\u3066\u3002<strong>main\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u76f4\u63a5\u547c\u3073\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\u306b\u306f <code>static<\/code> \u304c\u5fc5\u8981<\/strong>\u3067\u3059\u3002\u3053\u308c\u306fJava\u306e\u30af\u30e9\u30b9\u8a2d\u8a08\u306b\u95a2\u308f\u308b\u30eb\u30fc\u30eb\u3067\u3001\u6700\u521d\u306e\u6bb5\u968e\u3067\u306f\u300cmain\u304b\u3089\u547c\u3076\u306a\u3089 static \u3092\u3064\u3051\u308b\u300d\u3068\u899a\u3048\u3066\u304a\u3051\u3070OK\u3067\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\" id=\"section3\">\uff13\uff0e\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u6574\u7406\u3057\u3066\u304a\u304d\u305f\u3044\u3053\u3068<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section3-1\">\u2460\u5b9f\u5f15\u6570\u3068\u4eee\u5f15\u6570\u306e\u95a2\u4fc2\uff0f\u5024\u6e21\u3057\u3068\u53c2\u7167\u6e21\u3057\u306e\u9055\u3044<\/h3>\n\n\n\n<p>\u5148\u307b\u3069\u89e6\u308c\u305f\u300c\u5b9f\u5f15\u6570\u30fb\u4eee\u5f15\u6570\u300d\u306b\u95a2\u9023\u3057\u3066\u3001\u3082\u30461\u3064\u5927\u4e8b\u306a\u6982\u5ff5\u304c<strong>\u300c\u5024\u6e21\u3057\u300d\u3068\u300c\u53c2\u7167\u6e21\u3057\u300d<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p>Java\u3067\u306f\u3001\u5f15\u6570\u306e\u578b\u306b\u3088\u3063\u3066\u6e21\u3057\u65b9\u304c\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n  <li><strong>\u57fa\u672c\u30c7\u30fc\u30bf\u578b\uff08int\u30fbdouble \u306a\u3069\uff09\u2192 \u5024\u6e21\u3057<\/strong>\uff1a\u5024\u306e\u30b3\u30d4\u30fc\u304c\u6e21\u3055\u308c\u308b\u3002\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u5909\u66f4\u3057\u3066\u3082\u3001\u547c\u3073\u51fa\u3057\u5143\u306e\u5909\u6570\u306f\u5909\u308f\u3089\u306a\u3044\u3002<\/li>\n  <li><strong>\u53c2\u7167\u578b\uff08\u914d\u5217\u30fbString\u306a\u3069\uff09\u2192 \u53c2\u7167\u6e21\u3057<\/strong>\uff1a\u30e1\u30e2\u30ea\u4e0a\u306e\u300c\u5834\u6240\u300d\u304c\u6e21\u3055\u308c\u308b\u3002\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u5909\u66f4\u3059\u308b\u3068\u3001\u547c\u3073\u51fa\u3057\u5143\u306e\u5909\u6570\u306b\u3082\u5f71\u97ff\u304c\u51fa\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre><code>\/\/ \u5024\u6e21\u3057\uff08\u57fa\u672c\u30c7\u30fc\u30bf\u578b\uff09\uff1a\u547c\u3073\u51fa\u3057\u5143\u306f\u5909\u308f\u3089\u306a\u3044\nstatic void changeValue(int num) {\n    num = 99;   \/\/ \u30b3\u30d4\u30fc\u3092\u5909\u3048\u3066\u3044\u308b\u3060\u3051\n}\n\nint var = 0;\nchangeValue(var);\nSystem.out.println(var);   \/\/ \u2192 0\uff08\u5909\u308f\u3063\u3066\u3044\u306a\u3044\uff01\uff09\n\n\/\/ \u53c2\u7167\u6e21\u3057\uff08\u914d\u5217\uff09\uff1a\u547c\u3073\u51fa\u3057\u5143\u3082\u5909\u308f\u308b\uff01\nstatic void changeArray(int[] ary) {\n    ary[0] = 99;   \/\/ \u540c\u3058\u5834\u6240\u3092\u64cd\u4f5c\u3057\u3066\u3044\u308b\n}\n\nint[] array = new int[]{0, 1, 2};\nchangeArray(array);\nSystem.out.println(array[0]);   \/\/ \u2192 99\uff08\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u305f\uff01\uff09<\/code><\/pre>\n\n\n\n<p>\u300c\u914d\u5217\u3092\u6e21\u3057\u305f\u3089\u4e2d\u8eab\u304c\u5909\u308f\u3063\u305f\uff01\u300d\u306f\u3088\u304f\u3042\u308b\u30d0\u30b0\u306e\u539f\u56e0\u3067\u3059\u3002<strong>\u53c2\u7167\u6e21\u3057\u306e\u6319\u52d5\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u3001\u30d0\u30b0\u3092\u9632\u3050\u7b2c\u4e00\u6b69<\/strong>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section3-2\">\u2461return\u6587\u306f1\u3064\u306b\u307e\u3068\u3081\u308b\uff08\u69cb\u9020\u5316\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u539f\u5247\uff09<\/h3>\n\n\n\n<p>\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u308b\u3068\u3001\u6761\u4ef6\u5206\u5c90\u306e\u4e2d\u306b\u8907\u6570\u306e <code>return<\/code> \u6587\u3092\u66f8\u304d\u305f\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3067\u3082\u3001<strong>\u69cb\u9020\u5316\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u8003\u3048\u65b9\u3067\u306f\u300c\u30e1\u30bd\u30c3\u30c9\u306e\u51fa\u53e3\u306f1\u3064\u306b\u3059\u308b\u300d\u304c\u539f\u5247<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u274c return\u6587\u304c\u8907\u6570\uff08\u51fa\u53e3\u304c\u8907\u6570\uff09\nstatic int getA(int param) {\n    if (param > 10) {\n        return 1;   \/\/ \u51fa\u53e31\n    } else {\n        return 0;   \/\/ \u51fa\u53e32\n    }\n}\n\n\/\/ \u2705 return\u6587\u30921\u3064\u306b\u307e\u3068\u3081\u308b\uff08\u63a8\u5968\uff09\nstatic int getA(int param) {\n    int ret;\n    if (param > 10) {\n        ret = 1;\n    } else {\n        ret = 0;\n    }\n    return ret;   \/\/ \u51fa\u53e3\u306f\u3053\u3053\u3060\u3051\uff01\n}<\/code><\/pre>\n\n\n\n<p>\u307e\u305f\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04\u3068\u3057\u3066 <strong><code>return<\/code> \u6587\u306b\u4e0d\u8981\u306a <code>()<\/code> \u306f\u3064\u3051\u307e\u305b\u3093<\/strong>\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u274c \u4e0d\u9069\u5408\u4f8b\nreturn (value);\nreturn (1);\n\n\/\/ \u2705 \u9069\u5408\u4f8b\nreturn value;\nreturn 1;<\/code><\/pre>\n\n\n\n<p>\u5c0f\u3055\u306a\u3053\u3068\u306b\u898b\u3048\u307e\u3059\u304c\u3001<strong>\u30c1\u30fc\u30e0\u3067\u7d71\u4e00\u3055\u308c\u305f\u30eb\u30fc\u30eb\u306b\u5f93\u3046<\/strong>\u3053\u3068\u304c\u3001\u9577\u671f\u7684\u306b\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u5b88\u308b\u3053\u3068\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h3 class=\"wp-block-heading\" id=\"section3-3\">\u2462\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u547d\u540d\u898f\u7d04\u3068\u3001\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u8a2d\u8a08\u306e\u30b3\u30c4<\/h3>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001<strong>\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u4ed8\u3051\u65b9<\/strong>\u306b\u3064\u3044\u3066\u3002\u826f\u3044\u30e1\u30bd\u30c3\u30c9\u540d\u306f\u3001\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u4eba\uff08\u672a\u6765\u306e\u81ea\u5206\u3084\u30c1\u30fc\u30e0\u30e1\u30f3\u30d0\u30fc\uff09\u3078\u306e\u300c\u30d7\u30ec\u30bc\u30f3\u30c8\u300d\u3067\u3059\u3002<\/p>\n\n\n\n<p>Java\u306e\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04\u3067\u306f\u3001<strong>\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u5148\u982d\u306e\u5358\u8a9e\u306f\u306a\u308b\u3079\u304f\u52d5\u8a5e\u306b\u3059\u308b<\/strong>\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table>\n  <thead>\n    <tr>\n      <th>\u274c \u308f\u304b\u308a\u306b\u304f\u3044\u540d\u524d<\/th>\n      <th>\u2705 \u308f\u304b\u308a\u3084\u3059\u3044\u540d\u524d<\/th>\n      <th>\u7406\u7531<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr><td><code>price()<\/code><\/td><td><code>calcPrice()<\/code><\/td><td>\u300c\u8a08\u7b97\u3059\u308b\u300d\u3068\u3044\u3046\u52d5\u4f5c\u304c\u660e\u78ba<\/td><\/tr>\n    <tr><td><code>name()<\/code><\/td><td><code>getUserName()<\/code><\/td><td>\u300c\u53d6\u5f97\u3059\u308b\u300d\u300c\u4f55\u3092\u53d6\u5f97\u3059\u308b\u304b\u300d\u304c\u660e\u78ba<\/td><\/tr>\n    <tr><td><code>check()<\/code><\/td><td><code>isValidInput()<\/code><\/td><td>\u300c\u5224\u5b9a\u3059\u308b\uff08boolean \u3092\u8fd4\u3059\uff09\u300d\u3053\u3068\u304c\u660e\u78ba<\/td><\/tr>\n    <tr><td><code>disp()<\/code><\/td><td><code>dispHeader()<\/code><\/td><td>\u300c\u4f55\u3092\u8868\u793a\u3059\u308b\u304b\u300d\u304c\u660e\u78ba<\/td><\/tr>\n  <\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>\u307e\u305f\u3001<strong>\u82f1\u5358\u8a9e\u306e\u5bfe\u79f0\u6027\u306b\u3082\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046<\/strong>\u3002\u305f\u3068\u3048\u3070 <code>open<\/code> \u3068 <code>close<\/code>\u3001<code>get<\/code> \u3068 <code>set<\/code>\u3001<code>start<\/code> \u3068 <code>stop<\/code> \u306e\u3088\u3046\u306b\u3001\u5bfe\u306b\u306a\u308b\u51e6\u7406\u306b\u306f\u5bfe\u79f0\u7684\u306a\u540d\u524d\u3092\u3064\u3051\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u306e\u610f\u56f3\u304c\u4f1d\u308f\u308a\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre><code>\/\/ \u2705 \u5bfe\u79f0\u6027\u3092\u610f\u8b58\u3057\u305f\u547d\u540d\nstatic void openFile(String path) { \/* \u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f *\/ }\nstatic void closeFile(String path) { \/* \u30d5\u30a1\u30a4\u30eb\u3092\u9589\u3058\u308b *\/ }\n\nstatic String getUserName() { \/* \u540d\u524d\u3092\u53d6\u5f97 *\/ return \"\"; }\nstatic void setUserName(String name) { \/* \u540d\u524d\u3092\u30bb\u30c3\u30c8 *\/ }<\/code><\/pre>\n\n\n\n<p>\u3053\u3046\u3044\u3063\u305f\u7a4d\u307f\u91cd\u306d\u304c\u3001<strong>\u8ab0\u304c\u8aad\u3093\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u306a\u30b3\u30fc\u30c9<\/strong>\u306b\u3064\u306a\u304c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n<hr>\n\n\n<h2 class=\"wp-block-heading\" id=\"summary\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4eca\u56de\u306fJava\u306e\u300c\u30e1\u30bd\u30c3\u30c9\u300d\u306b\u3064\u3044\u3066\u3001\u57fa\u790e\u306e\u57fa\u790e\u304b\u3089\u73fe\u5834\u3067\u4f7f\u3048\u308b\u77e5\u8b58\u307e\u3067\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u6700\u5f8c\u306b\u30dd\u30a4\u30f3\u30c8\u3092\u6574\u7406\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table>\n  <thead>\n    <tr>\n      <th>\u30c6\u30fc\u30de<\/th>\n      <th>\u30dd\u30a4\u30f3\u30c8<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><strong>\u30e1\u30bd\u30c3\u30c9\u306e\u4fbf\u5229\u3055<\/strong><\/td>\n      <td>\u51e6\u7406\u306e\u90e8\u54c1\u5316\u30fb\u518d\u5229\u7528\u30fb\u4fdd\u5b88\u6027\u5411\u4e0a\u3002\u30c1\u30fc\u30e0\u958b\u767a\u3067\u3082\u62c5\u5f53\u5206\u3051\u304c\u3057\u3084\u3059\u304f\u306a\u308b<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>\u57fa\u672c\u69cb\u6587<\/strong><\/td>\n      <td><code>static \u623b\u308a\u5024\u578b \u30e1\u30bd\u30c3\u30c9\u540d(\u5f15\u6570) { \u51e6\u7406; return \u623b\u308a\u5024; }<\/code><\/td>\n    <\/tr>\n    <tr>\n      <td><strong>\u5f15\u6570\u3068\u623b\u308a\u5024<\/strong><\/td>\n      <td>\u5b9f\u5f15\u6570\u3068\u4eee\u5f15\u6570\u306f\u5909\u6570\u540d\u304c\u9055\u3063\u3066\u3082OK\u3002\u623b\u308a\u5024\u306fvoid\u304b1\u3064\u3060\u3051<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>\u5024\u6e21\u3057\u3068\u53c2\u7167\u6e21\u3057<\/strong><\/td>\n      <td>\u57fa\u672c\u578b\u306f\u5024\u6e21\u3057\uff08\u547c\u3073\u51fa\u3057\u5143\u306f\u5909\u308f\u3089\u306a\u3044\uff09\u3001\u53c2\u7167\u578b\u306f\u53c2\u7167\u6e21\u3057\uff08\u5f71\u97ff\u304c\u51fa\u308b\uff09<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>return\u6587\u30fb\u547d\u540d\u898f\u7d04<\/strong><\/td>\n      <td>\u51fa\u53e3\u306f1\u3064\u306b\u3002\u30e1\u30bd\u30c3\u30c9\u540d\u306f\u52d5\u8a5e\u59cb\u307e\u308a\u30fb\u5bfe\u79f0\u6027\u3092\u610f\u8b58\u3057\u3066\u547d\u540d\u3059\u308b<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u3092\u3046\u307e\u304f\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306e\u300c\u8a2d\u8a08\u529b\u300d\u304c\u8eab\u306b\u3064\u3044\u3066\u304d\u307e\u3059\u3002<strong>\u300c\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u4f55\u3092\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304b\u300d\u3092\u4e00\u8a00\u3067\u8aac\u660e\u3067\u304d\u308b\u304f\u3089\u3044\u30b7\u30f3\u30d7\u30eb\u306b<\/strong>\u307e\u3068\u3081\u308b\u3053\u3068\u2014\u2014\u305d\u308c\u304c\u826f\u3044\u30e1\u30bd\u30c3\u30c9\u8a2d\u8a08\u306e\u7b2c\u4e00\u6b69\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u4eca\u65e5\u306e\u30b3\u30fc\u30c9\u4f8b\u3092\u5b9f\u969b\u306b\u6253\u3063\u3066\u52d5\u304b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u300c\u624b\u3092\u52d5\u304b\u3059\u3053\u3068\u300d\u304c\u7406\u89e3\u309210\u500d\u901f\u304f\u3057\u3066\u304f\u308c\u307e\u3059\uff01<\/p>\n\n\n\n<p>\u6b21\u56de\u306f\u300c\u30af\u30e9\u30b9\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u57fa\u790e\u300d\u306b\u3064\u3044\u3066\u89e3\u8aac\u4e88\u5b9a\u3067\u3059\u3002\u304a\u697d\u3057\u307f\u306b\uff01<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u30e1\u30bd\u30c3\u30c9\u3063\u3066\u3001\u305f\u3060\u306e\u51e6\u7406\u306e\u304b\u305f\u307e\u308a\u3067\u3057\u3087\uff1f\u300d\u2014\u2014\u305d\u3046\u601d\u3063\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u5b9f\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3053\u306a\u305b\u308b\u304b\u3069\u3046\u304b\u3067\u3001\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u30fb\u4fee\u6b63\u306e\u3057\u3084\u3059\u3055\u30fb\u30c1\u30fc\u30e0\u3067\u306e\u958b\u767a\u52b9\u7387\u304c\u5287\u7684\u306b\u5909\u308f\u3063\u3066\u304d\u307e\u3059\u3002\u30d7\u30ed\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u300c\u30e1\u30bd\u30c3\u30c9&hellip;<\/p>\n","protected":false},"author":1,"featured_media":423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=416"}],"version-history":[{"count":1,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions\/417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/423"}],"wp:attachment":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}