{"id":8679,"date":"2013-03-06T21:00:30","date_gmt":"2013-03-06T12:00:30","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=8679"},"modified":"2013-03-06T21:04:29","modified_gmt":"2013-03-06T12:04:29","slug":"hello-world-mystery-code","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/hello-world-mystery-code\/","title":{"rendered":"\u300chello world\u300d\u3092\u8868\u793a\u3059\u308b\u8b0e\u306e\u30b3\u30fc\u30c9\u304c\u8a71\u984c\u306b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/wp\/wp-content\/uploads\/2013\/03\/blogjava.png\" alt=\"Java\" title=\"java.png\" border=\"0\" width=\"560\" height=\"360\" \/><\/p>\n<p>\u6d77\u5916\u30e1\u30b8\u30e3\u30fc\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 Q and A \u30b5\u30a4\u30c8Stack Overflow\u3067\u3001\u300chello world\u300d\u3092\u8868\u793a\u3059\u308b\u8b0e\u306eJava\u30b3\u30fc\u30c9\u304c\u8a71\u984c\u3068\u306a\u3063\u3066\u3044\u307e\u3059(<a href=\"http:\/\/stackoverflow.com\/questions\/15182496\/why-does-this-code-print-hello-world\">java - Why does this code print \"hello world\"? - Stack Overflow<\/a>)\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u8a71\u984c\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n<pre><code class=\"java\">public static String randomString(int i)\r\n{\r\n    Random ran = new Random(i);\r\n    StringBuilder sb = new StringBuilder();\r\n    for (int n = 0; ; n++)\r\n    {\r\n        int k = ran.nextInt(27);\r\n        if (k == 0)\r\n            break;\r\n\r\n        sb.append((char)('`' + k));\r\n    }\r\n\r\n    return sb.toString();\r\n}\r\n<\/code><\/pre>\n<p>\u3053\u306estatic\u30e1\u30bd\u30c3\u30c9randomString()\u3092\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3059\u3068\u3001\u306a\u305c\u304b\u300chello world\u300d\u3068\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"java\">System.out.println(randomString(-229985452) + \" \" + randomString(-147909649));\r\n<\/code><\/pre>\n<p>\u30d9\u30b9\u30c8\u30a2\u30f3\u30b5\u30fc\u306b\u3088\u308b\u3068\u3001<strong>java.util.Random\u304c\u7279\u5b9a\u306e\u30b7\u30fc\u30c9\u3067\u521d\u671f\u5316\u3055\u308c\u308b\u305f\u3081<\/strong>\u3001\u30e9\u30f3\u30c0\u30e0\u95a2\u6570\u304c\u540c\u3058\u5024\u3092\u8fd4\u3057\u3001\u305d\u306e\u7d50\u679c\u3042\u308b\u7279\u5b9a\u306e\u6587\u5b57\u5217\u304c\u8fd4\u308b\u3053\u3068\u306b\u306a\u308b(\u3053\u306e\u5834\u5408\u3001hello world)\u3068\u89e3\u8aac\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3057\u304b\u306b\u6bce\u56de\u540c\u3058\u30b7\u30fc\u30c9\u5024\u3067Random\u95a2\u6570\u3092\u521d\u671f\u5316\u3057\u3066\u3057\u307e\u3044\u3001\u540c\u3058\u30e9\u30f3\u30c0\u30e0\u5024\u3092\u53d6\u5f97\u3057\u3066\u3057\u307e\u3046\u30df\u30b9\u306f\u3042\u308a\u304c\u3061\u3067\u3059\u304c\u3001\u3053\u3093\u306a\u6587\u5b57\u5217\u304c\u51fa\u529b\u3055\u308c\u308b\u3068\u306f\u2026\u3002<\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u6b04\u3067\u306f\u3082\u3063\u3068\u30c7\u30a3\u30fc\u30d7\u306a\u8b70\u8ad6\u304c\u7e70\u308a\u5e83\u3052\u3089\u308c\u3066\u3044\u308b\u306e\u3067\u6c17\u306b\u306a\u3063\u305f\u4eba\u306f\u30ea\u30f3\u30af\u3092\u305f\u3069\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6d77\u5916\u30e1\u30b8\u30e3\u30fc\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 Q and A \u30b5\u30a4\u30c8Stack Overflow\u3067\u3001\u300chello world\u300d\u3092\u8868\u793a\u3059\u308b\u8b0e\u306eJava\u30b3\u30fc\u30c9\u304c\u8a71\u984c\u3068\u306a\u3063\u3066\u3044\u307e\u3059(java - Why does this code print [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":8678,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75,13],"tags":[134,615],"class_list":["post-8679","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-etc","tag-java","tag-stackoverflow"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/8679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=8679"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/8679\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/8678"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=8679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=8679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=8679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}