{"id":2544,"date":"2018-05-06T17:46:37","date_gmt":"2018-05-06T08:46:37","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=2544"},"modified":"2018-05-06T18:19:53","modified_gmt":"2018-05-06T09:19:53","slug":"%e3%80%90java%e3%80%91tostring%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=2544","title":{"rendered":"\u3010Java\u3011System.out.println\u3063\u3066\u4f55\uff1f"},"content":{"rendered":"<p>\u57fa\u672c\u7684\u306a\u3053\u3068\u3067\u3059\u304c\u3001\u666e\u6bb5\u3001\u6211\u3005\u304cJava\u3067\u958b\u767a\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u969b\u306f\u3001\u5f53\u305f\u308a\u524d\u306e\u3088\u3046\u306b\u300cSytem.out.println(\u5909\u6570)\u300d\u3068\u3044\u3046\u3088\u3046\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\u304c\u3001<span style=\"color: #ff0000;\"><strong>\u3053\u306e\u30af\u30e9\u30b9\u306f\u4e00\u4f53\u4f55\u306a\u3093\u3067\u3057\u3087\u3046\u304b\u3002\u7d30\u304b\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/strong><\/span><\/p>\n<h2>System.out.println\u306e\u5f79\u5272<\/h2>\n<p>API\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u898b\u308b\u3068\u3001\u5f15\u6570\u3068\u3057\u3066Object\u578b\u3092\u53d6\u308a\u3001\u6e21\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u5f79\u5272\u3067\u3059\u304c\u3001\u7d30\u304b\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>System\u30af\u30e9\u30b9<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>Object\u30af\u30e9\u30b9\u3092\u7d99\u627f<\/strong><\/span>\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2547\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/System\u30af\u30e9\u30b9.png\" alt=\"\" width=\"636\" height=\"177\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/System\u30af\u30e9\u30b9.png 636w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/System\u30af\u30e9\u30b9-300x83.png 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<h4>out\u30d5\u30a3\u30fc\u30eb\u30c9<\/h4>\n<p>System\u30af\u30e9\u30b9\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3057\u3066\u3001PrintStream\u30af\u30e9\u30b9\u578b\u306e\u300cout\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2548\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/out.png\" alt=\"\" width=\"686\" height=\"217\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/out.png 686w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/out-300x95.png 300w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/p>\n<h4>println\u30e1\u30bd\u30c3\u30c9<\/h4>\n<p>\u8272\u3005\u306a\u5f15\u6570\u3092\u53d6\u308b\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3044\u305a\u308c\u3082\u51fa\u529b\u3092\u3059\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2550\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/println.png\" alt=\"\" width=\"576\" height=\"356\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/println.png 576w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/println-300x185.png 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<h2>System.out.println()\u306e\u5f15\u6570\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u6e21\u3057\u305f\u5834\u5408<\/h2>\n<p>\u4f8b\u3048\u3070\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u751f\u6210\u3057\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u305d\u306e\u307e\u307e\u3001System.out.println\u3092\u6e21\u3057\u307e\u3059\u3002<\/p>\n<h3>\u5f15\u304d\u6e21\u3059\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9<\/h3>\n<pre class=\"lang:default decode:true \">public class People {\r\n\r\n\t\/\/\u81ea\u5df1\u7d39\u4ecb\r\n\tvoid selfIntroduction() {;\r\n\t\tSystem.out.println(\"\u79c1\u306f\u4eba\u3067\u3059\u3002\");\r\n\t}\r\n\r\n}<\/pre>\n<h3>\u547c\u3093\u3067\u3044\u308b\u30af\u30e9\u30b9<\/h3>\n<pre class=\"lang:default decode:true\">public class Main {\r\n\r\n\tpublic static void main(String args[]) {\r\n\r\n\t\tPeople hito = new People();\r\n\t\tSystem.out.println(hito);\r\n\r\n\t}\r\n\r\n}<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\u3068\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5909\u306a\u51fa\u529b\u7d50\u679c\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2552\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/sysout.png\" alt=\"\" width=\"162\" height=\"92\" \/><\/p>\n<p>\u3053\u308c\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5834\u5408\u306f\u3001toString()\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>toString\u30e1\u30bd\u30c3\u30c9<\/h3>\n<p>Object\u30af\u30e9\u30b9\u306b\u3042\u308b\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5185\u5bb9\u304c\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u306a\u306e\u304b\u6587\u5b57\u5217\u8868\u73fe\u3092\u5f97\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u578b\u540d@\u82f1\u6570\u5b57\u300d<\/strong><\/span>\u3068\u3044\u3046\u51fa\u529b\u5f62\u5f0f\u3092\u53d6\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u308f\u3051\u306e\u308f\u304b\u3089\u306a\u3044\u7d50\u679c\u306b\u306a\u308a\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306btoString\u30e1\u30bd\u30c3\u30c9\u3092\u30af\u30e9\u30b9\u3067\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:default decode:true\">public class People {\r\n\r\n\t\/\/\u81ea\u5df1\u7d39\u4ecb\r\n\tvoid selfIntroduction() {;\r\n\t\tSystem.out.println(\"\u79c1\u306f\u4eba\u3067\u3059\u3002\");\r\n\t}\r\n\r\n\tpublic String toString() {\r\n\t\treturn \"\u3053\u308c\u306f\u3001\u4eba\u7528\u306e\u30af\u30e9\u30b9\u3067\u3059\u3002\";\r\n\t}\r\n\r\n}<\/pre>\n<p>\u3059\u308b\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u610f\u56f3\u3057\u305f\u6587\u5b57\u5217\u304c\u51fa\u529b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2553\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/toString\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9.png\" alt=\"\" width=\"211\" height=\"86\" \/><\/p>\n<p>\u7528\u9014\u304c\u8907\u96d1\u306a\u30af\u30e9\u30b9\u307b\u3069\u3001\u5f8c\u3067\u898b\u305f\u3068\u304d\u306b\u308f\u304b\u3089\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u3044\u304f\u3064\u3082\u306e\u60c5\u5831\u3092\u6301\u3064\u30af\u30e9\u30b9\u306e\u5834\u5408\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u662f\u975etoString\u30e1\u30bd\u30c3\u30c9\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3057\u3066\u3001\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u51fa\u529b\u3055\u305b\u3066\u3042\u3052\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"\u57fa\u672c\u7684\u306a\u3053\u3068\u3067\u3059\u304c\u3001\u666e\u6bb5\u3001\u6211\u3005\u304cJava\u3067\u958b\u767a\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u969b\u306f\u3001\u5f53\u305f\u308a\u524d\u306e\u3088\u3046\u306b\u300cSytem.out.println(\u5909\u6570)\u300d\u3068\u3044\u3046\u3088\u3046\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30af\u30e9\u30b9\u306f\u4e00\u4f53\u4f55\u306a\u3093\u3067\u3057\u3087\u3046\u304b\u3002\u7d30\u304b\u304f\u898b\u3066\u3044\u304d\u307e\u3057 [&hellip;]","protected":false},"author":1,"featured_media":2557,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2544"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2544"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2544\/revisions"}],"predecessor-version":[{"id":2556,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/2544\/revisions\/2556"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/2557"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2544"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}