{"id":918,"date":"2023-05-02T20:26:23","date_gmt":"2022-09-18T01:16:50","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/"},"modified":"2025-08-01T03:32:05","modified_gmt":"2025-07-31T18:32:05","slug":"java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/","title":{"rendered":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"},"content":{"rendered":"<p>\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u884c\u52d5\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e1\u3064\u3067\u3059\u3002\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u7279\u5b9a\u306e\u30bf\u30b9\u30af\u306b\u8907\u6570\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u3042\u308b\u5834\u5408\u306b\u4f7f\u7528\u3055\u308c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u5b9f\u969b\u306e\u5b9f\u88c5\u3092\u5b9f\u884c\u6642\u306b\u6c7a\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6226\u7565\u30d1\u30bf\u30fc\u30f3<\/h2>\n<p>\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306f\u30dd\u30ea\u30b7\u30fc\u30d1\u30bf\u30fc\u30f3\u3068\u3057\u3066\u3082\u77e5\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u8907\u6570\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9a\u7fa9\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u4f7f\u7528\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u6e21\u3059\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306e\u6700\u3082\u826f\u3044\u4f8b\u306e\u4e00\u3064\u306f\u3001Comparator\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308bCollections.sort()\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002Comparator\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u7570\u306a\u308b\u5b9f\u88c5\u306b\u57fa\u3065\u3044\u3066\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u7570\u306a\u308b\u65b9\u6cd5\u3067\u30bd\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002\u4f8b\u3068\u3057\u3066\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u3001\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u652f\u6255\u3044\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u3068PayPal\u3092\u4f7f\u7528\u3059\u308b\u652f\u6255\u3044\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u306e2\u3064\u3092\u6301\u3061\u307e\u3059\u3002\u307e\u305a\u3001\u652f\u6255\u3044\u91d1\u984d\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u305f\u3081\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002PaymentStrategy.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\npublic interface PaymentStrategy {\r\n\r\n\tpublic void pay(int amount);\r\n}\r\n<\/code><\/pre>\n<p>\u4eca\u5f8c\u306f\u3001\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u30fb\u30c7\u30d3\u30c3\u30c8\u30ab\u30fc\u30c9\u307e\u305f\u306fPayPal\u3092\u4f7f\u7528\u3057\u305f\u652f\u6255\u3044\u306e\u305f\u3081\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002CreditCardStrategy.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\npublic class CreditCardStrategy implements PaymentStrategy {\r\n\r\n\tprivate String name;\r\n\tprivate String cardNumber;\r\n\tprivate String cvv;\r\n\tprivate String dateOfExpiry;\r\n\t\r\n\tpublic CreditCardStrategy(String nm, String ccNum, String cvv, String expiryDate){\r\n\t\tthis.name=nm;\r\n\t\tthis.cardNumber=ccNum;\r\n\t\tthis.cvv=cvv;\r\n\t\tthis.dateOfExpiry=expiryDate;\r\n\t}\r\n\t@Override\r\n\tpublic void pay(int amount) {\r\n\t\tSystem.out.println(amount +\" paid with credit\/debit card\");\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>PaypalStrategy.java\u3092\u65e5\u672c\u8a9e\u3067\u8ff0\u3079\u308b\u3068<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\npublic class PaypalStrategy implements PaymentStrategy {\r\n\r\n\tprivate String emailId;\r\n\tprivate String password;\r\n\t\r\n\tpublic PaypalStrategy(String email, String pwd){\r\n\t\tthis.emailId=email;\r\n\t\tthis.password=pwd;\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic void pay(int amount) {\r\n\t\tSystem.out.println(amount + \" paid using Paypal.\");\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u79c1\u305f\u3061\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u3059\u3067\u306b\u6e96\u5099\u5b8c\u4e86\u3067\u3059\u3002\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u306e\u5b9f\u88c5\u304a\u3088\u3073\u652f\u6255\u3044\u65b9\u6cd5\u306f\u3001\u652f\u6255\u3044\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u3068\u3057\u3066\u306e\u5165\u529b\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002Item.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\npublic class Item {\r\n\r\n\tprivate String upcCode;\r\n\tprivate int price;\r\n\t\r\n\tpublic Item(String upc, int cost){\r\n\t\tthis.upcCode=upc;\r\n\t\tthis.price=cost;\r\n\t}\r\n\r\n\tpublic String getUpcCode() {\r\n\t\treturn upcCode;\r\n\t}\r\n\r\n\tpublic int getPrice() {\r\n\t\treturn price;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\nimport java.text.DecimalFormat;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class ShoppingCart {\r\n\r\n\t\/\/List of items\r\n\tList&lt;Item&gt; items;\r\n\t\r\n\tpublic ShoppingCart(){\r\n\t\tthis.items=new ArrayList&lt;Item&gt;();\r\n\t}\r\n\t\r\n\tpublic void addItem(Item item){\r\n\t\tthis.items.add(item);\r\n\t}\r\n\t\r\n\tpublic void removeItem(Item item){\r\n\t\tthis.items.remove(item);\r\n\t}\r\n\t\r\n\tpublic int calculateTotal(){\r\n\t\tint sum = 0;\r\n\t\tfor(Item item : items){\r\n\t\t\tsum += item.getPrice();\r\n\t\t}\r\n\t\treturn sum;\r\n\t}\r\n\t\r\n\tpublic void pay(PaymentStrategy paymentMethod){\r\n\t\tint amount = calculateTotal();\r\n\t\tpaymentMethod.pay(amount);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u300c\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u306e\u652f\u6255\u3044\u65b9\u6cd5\u306b\u306f\u652f\u6255\u3044\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u5f15\u6570\u3068\u3057\u3066\u5fc5\u8981\u3067\u3042\u308a\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u3068\u3057\u3066\u4fdd\u7ba1\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u300d\u3068\u3044\u3046\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u6226\u7565\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u30c6\u30b9\u30c8\u3057\u307e\u3057\u3087\u3046\u3002\u300cShoppingCartTest.java\u300d\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.design.strategy;\r\n\r\npublic class ShoppingCartTest {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tShoppingCart cart = new ShoppingCart();\r\n\t\t\r\n\t\tItem item1 = new Item(\"1234\",10);\r\n\t\tItem item2 = new Item(\"5678\",40);\r\n\t\t\r\n\t\tcart.addItem(item1);\r\n\t\tcart.addItem(item2);\r\n\t\t\r\n\t\t\/\/pay by paypal\r\n\t\tcart.pay(new PaypalStrategy(\"myemail@example.com\", \"mypwd\"));\r\n\t\t\r\n\t\t\/\/pay by credit card\r\n\t\tcart.pay(new CreditCardStrategy(\"Pankaj Kumar\", \"1234567890123456\", \"786\", \"12\/15\"));\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u51fa\u529b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059: [output]<\/p>\n<pre class=\"post-pre\"><code>50 paid using Paypal.\r\n50 paid with credit\/debit card\r\n<\/code><\/pre>\n<h3>\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u30af\u30e9\u30b9\u56f3<\/h3>\n<h3>\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8<\/h3>\n<ul class=\"post-ul\">\n<li>We could have used composition to create instance variable for strategies but we should avoid that as we want the specific strategy to be applied for a particular task. Same is followed in Collections.sort() and Arrays.sort() method that take comparator as argument.<\/li>\n<li>Strategy Pattern is very similar to State Pattern. One of the difference is that Context contains state as instance variable and there can be multiple tasks whose implementation can be dependent on the state whereas in strategy pattern strategy is passed as argument to the method and context object doesn\u2019t have any variable to store it.<\/li>\n<li>Strategy pattern is useful when we have multiple algorithms for specific task and we want our application to be flexible to chose any of the algorithm at runtime for specific task.<\/li>\n<\/ul>\n<p>\u3053\u308c\u3067Java\u306b\u304a\u3051\u308b\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306b\u95a2\u3057\u3066\u306e\u8aac\u660e\u306f\u7d42\u308f\u308a\u3067\u3059\u3002\u304a\u6c17\u306b\u5165\u308a\u3044\u305f\u3060\u3051\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u884c\u52d5\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e1\u3064\u3067\u3059\u3002\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30d1\u30bf\u30fc\u30f3\u306f\u3001\u7279\u5b9a\u306e\u30bf\u30b9\u30af\u306b\u8907\u6570\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u3042\u308b\u5834\u5408\u306b\u4f7f\u7528\u3055\u308c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u5b9f\u969b\u306e\u5b9f\u88c5\u3092\u5b9f\u884c\u6642\u306b\u6c7a\u5b9a\u3057\u307e\u3059\u3002 \u6226\u7565\u30d1\u30bf\u30fc\u30f3 \u30b9\u30c8\u30e9\u30c6\u30b8\u30fc [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-918","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" \/>\n<meta property=\"og:description\" content=\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-18T01:16:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T18:32:05+00:00\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"10\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/\",\"name\":\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-09-18T01:16:50+00:00\",\"dateModified\":\"2025-07-31T18:32:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","description":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\/","og_locale":"ja_JP","og_type":"article","og_title":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb","og_description":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-09-18T01:16:50+00:00","article_modified_time":"2025-07-31T18:32:05+00:00","author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"10\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/","name":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-09-18T01:16:50+00:00","dateModified":"2025-07-31T18:32:05+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Java\u3067\u306e\u30b9\u30c8\u30e9\u30c6\u30b8\u30fc\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%a7%e3%81%ae%e3%82%b9%e3%83%88%e3%83%a9%e3%83%86%e3%82%b8%e3%83%bc%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=918"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":46637,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions\/46637"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}