{"id":981,"date":"2018-09-17T19:01:45","date_gmt":"2018-09-17T10:01:45","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=981"},"modified":"2018-12-23T01:50:32","modified_gmt":"2018-12-22T16:50:32","slug":"inetaddress-getlocalhost","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/hi\/\u092c\u094d\u0932\u0949\u0917\/java\/inetaddress-getlocalhost","title":{"rendered":"\u091c\u093e\u0935\u093e \u091a\u0932\u093e\u0928\u0947 \u0935\u093e\u0932\u0940 \u092e\u0936\u0940\u0928 \u0915\u093e \u0939\u094b\u0938\u094d\u091f\u0928\u093e\u092e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902"},"content":{"rendered":"<h2 class=\"common_title\"><a name=\"0\">\u091c\u093e\u0935\u093e \u091a\u0932\u093e\u0928\u0947 \u0935\u093e\u0932\u0940 \u092e\u0936\u0940\u0928 \u0915\u093e \u0939\u094b\u0938\u094d\u091f\u0928\u093e\u092e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902<\/a><br \/><strong>InetAddress.getLocalHost().getHostName()<\/strong><\/h2>\n<p>\n\u091c\u093e\u0935\u093e \u092a\u0930 \u091a\u0932\u0928\u0947 \u0935\u093e\u0932\u0940 \u090f\u0915 \u092e\u0936\u0940\u0928 \u0915\u093e<strong>\u0939\u094b\u0938\u094d\u091f \u0915\u093e \u0928\u093e\u092e<\/strong>(<strong>\u092e\u0936\u0940\u0928 \u0915\u093e \u0928\u093e\u092e<\/strong>) \u092f\u0939\u093e\u0901 \u092a\u094d\u0930\u0938\u094d\u0924\u0941\u0924 \u0939\u0948\u0964<br \/>\n\u0928\u092e\u0942\u0928\u093e \u092a\u094d\u0930\u094b\u0917\u094d\u0930\u093e\u092e \u0928\u093f\u092e\u094d\u0928 \u0935\u093f\u0927\u093f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0915\u0947 \u0939\u094b\u0938\u094d\u091f \u0928\u093e\u092e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0924\u093e \u0939\u0948\u0964\n<\/p>\n<div class=\"point\">\n<ul>\n<li><strong>java.net.InetAddress.getLocalHost()<\/strong> \u0926\u094d\u0935\u093e\u0930\u093e \u0938\u094d\u0925\u093e\u0928\u0940\u092f \u0939\u094b\u0938\u094d\u091f \u0915\u093e \u092a\u094d\u0930\u0924\u093f\u0928\u093f\u0927\u093f\u0924\u094d\u0935 \u0915\u0930\u0924\u093e \u0939\u0948 <strong>\u0907\u0928\u0947\u091f\u090f\u0921\u094d\u0930\u0947\u0938<\/strong> \u0915\u093e \u090f\u0915 \u0909\u0926\u093e\u0939\u0930\u0923 \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902.<\/li>\n<li>\u0938\u094d\u0925\u093e\u0928\u0940\u092f \u0939\u094b\u0938\u094d\u091f \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u093f\u092f\u093e <strong>\u0907\u0928\u0947\u091f\u090f\u0921\u094d\u0930\u0947\u0938<\/strong> \u0915\u093e <strong>getHostName()<\/strong> \u092e\u0936\u0940\u0928 \u0915\u093e \u0928\u093e\u092e \u0915\u093f\u0938\u0915\u0947 \u0926\u094d\u0935\u093e\u0930\u093e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u093f\u092f\u093e \u091c\u093e\u0924\u093e \u0939\u0948?<\/li>\n<\/ul>\n<\/div>\n<h2 class=\"common_title\"><a name=\"1\">\u0928\u092e\u0942\u0928\u093e \u0915\u093e\u0930\u094d\u092f\u0915\u094d\u0930\u092e<\/a><\/h2>\n<pre class=\"sample_src\">\/** * \u091a\u0932 \u0930\u0939\u0940 \u092e\u0936\u0940\u0928 \u0915\u093e \u0939\u094b\u0938\u094d\u091f\u0928\u093e\u092e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902\u0964 * @\u0930\u093f\u091f\u0930\u094d\u0928 \u0939\u094b\u0938\u094d\u091f \u0928\u093e\u092e * *\u092f\u0926\u093f \u0915\u094b\u0908 \u0905\u092a\u094d\u0930\u0924\u094d\u092f\u093e\u0936\u093f\u0924 \u0905\u092a\u0935\u093e\u0926 \u0939\u094b\u0924\u093e \u0939\u0948, \u0924\u094b \u0938\u094d\u091f\u094d\u0930\u093f\u0902\u0917 &quot;\u0905\u091c\u094d\u091e\u093e\u0924\u0939\u094b\u0938\u094d\u091f&quot; \u0932\u094c\u091f\u093e \u0926\u0940 \u091c\u093e\u0924\u0940 \u0939\u0948\u0964 *\/ \u0938\u093e\u0930\u094d\u0935\u091c\u0928\u093f\u0915 \u0938\u094d\u0925\u0948\u0924\u093f\u0915 \u0938\u094d\u091f\u094d\u0930\u093f\u0902\u0917 getHostName() { \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947\u0902 { \u0935\u093e\u092a\u0938\u0940 InetAddress.getLocalHost().getHostName(); }\u092a\u0915\u0921\u093c\u0947\u0902 (\u0905\u092a\u0935\u093e\u0926 \u0908) { e.printStackTrace(); } \u0935\u093e\u092a\u0938\u0940 &quot;\u0905\u091c\u094d\u091e\u093e\u0924\u0939\u094b\u0938\u094d\u091f&quot;; }\r\n<\/pre>\n<p><script type=\"text\/javascript\" src=\"https:\/\/chat-messenger.com\/js\/common.js?dd12sssas2223\" charset=\"UTF-8\"><\/script><br \/>\n<script type=\"text\/javascript\"> writePR(); <\/script><\/p>\n<h2 class=\"common_title\"><a name=\"2\">\u0928\u093f\u0937\u094d\u092a\u093e\u0926\u0928 \u092a\u0930\u093f\u0923\u093e\u092e<\/a><\/h2>\n<p>\u25c6\u0928\u093f\u0937\u094d\u092a\u093e\u0926\u0928 \u0909\u0926\u093e\u0939\u0930\u0923<\/p>\n<pre class=\"sample_src\">\/** * \u0928\u093f\u0937\u094d\u092a\u093e\u0926\u0928 \u0909\u0926\u093e\u0939\u0930\u0923 * @param args *\/ \u0938\u093e\u0930\u094d\u0935\u091c\u0928\u093f\u0915 \u0938\u094d\u0925\u0948\u0924\u093f\u0915 \u0936\u0942\u0928\u094d\u092f \u092e\u0941\u0916\u094d\u092f (\u0938\u094d\u091f\u094d\u0930\u093f\u0902\u0917 [] args) { \u0938\u094d\u091f\u094d\u0930\u093f\u0902\u0917 \u0928\u093e\u092e = getHostName(); System.out.println(&quot;\u0939\u094b\u0938\u094d\u091f \u0928\u093e\u092e = &#039;&#039;+\u0928\u093e\u092e+&quot;&#039;&quot;); }\r\n<\/pre>\n<p>\u25c6\u0906\u0909\u091f\u092a\u0941\u091f \u092a\u0930\u093f\u0923\u093e\u092e<\/p>\n<pre class=\"console\">\u0939\u094b\u0938\u094d\u091f\u0928\u093e\u092e = &#039;*****\u090f\u091f\u0928&#039;\r\n<\/pre>\n<p>*\u092e\u0936\u0940\u0928 \u0915\u093e \u0939\u094b\u0938\u094d\u091f \u0928\u093e\u092e \u091c\u0939\u093e\u0902 \u0915\u092e\u093e\u0902\u0921 \u0928\u093f\u0937\u094d\u092a\u093e\u0926\u093f\u0924 \u0915\u093f\u092f\u093e \u0917\u092f\u093e \u0925\u093e \u0935\u093e\u0938\u094d\u0924\u0935 \u092e\u0947\u0902 \u0906\u0909\u091f\u092a\u0941\u091f \u0939\u0948\u0964<\/p>","protected":false},"excerpt":{"rendered":"<p>Java InetAddress.getLocalHost().getHos \u091a\u0932\u093e\u0928\u0947 \u0935\u093e\u0932\u0940 \u092e\u0936\u0940\u0928 \u0915\u093e \u0939\u094b\u0938\u094d\u091f \u0928\u093e\u092e \u092a\u094d\u0930\u093e\u092a\u094d\u0924 \u0915\u0930\u0947\u0902 [\u2026]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":""},"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/posts\/981"}],"collection":[{"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/comments?post=981"}],"version-history":[{"count":4,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/posts\/981\/revisions"}],"predecessor-version":[{"id":1870,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/posts\/981\/revisions\/1870"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/media?parent=981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/categories?post=981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/hi\/wp-json\/wp\/v2\/tags?post=981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}