{"id":164027,"date":"2012-12-26T13:39:03","date_gmt":"2012-12-26T09:39:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=164027"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=164027","title":{"rendered":"<span class=\"post_title\">Java \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 vs null<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>  \u0412 \u0442\u043e\u043f\u0438\u043a\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/162017\">Java \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Set &#038; Map \u0432 Java. \u041d\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\u041c\u043e\u0436\u0435\u0442 \u043b\u0438 <b>null<\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430 \u0432 Map?<\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u043b\u0438 Set \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c <b>null<\/b>?<\/li>\n<\/ol>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0442 \u043d\u0430\u0434 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0437\u0430\u0442\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442 \u0438\u0445 \u0441 \u043c\u043e\u0438\u043c\u0438. \u0421\u0430\u043c\u044b\u0435 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c, \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f (\u043d\u0443 \u043c\u0430\u043b\u043e \u043b\u0438) \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n<h5>1. \u041c\u043e\u0436\u0435\u0442 \u043b\u0438 null \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430 \u0432 Map?<\/h5>\n<p>  <\/p>\n<h6>HashMap<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">Map map = new HashMap(); map.put(null,  &quot;null&quot;); \/\/ \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u0442\u0438\u043d\u044b ... \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442! <\/code><\/pre>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438  <\/p>\n<pre><code class=\"java\">System.out.println(map.size()); \/\/ \u0432\u044b\u0432\u043e\u0434: 1 System.out.println(map.get(null)); \/\/ \u0432\u044b\u0432\u043e\u0434: true <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430:  <\/p>\n<blockquote><p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0445\u0435\u0448-\u043a\u043e\u0434 \u043a\u043b\u044e\u0447\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u0440\u0437\u0438\u043d\u044b (\u043d\u043e\u043c\u0435\u0440 \u044f\u0447\u0435\u0439\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430), \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442.<\/p><\/blockquote>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f hash-code \u043e\u0442 null\u2026 \u0445\u043c\u043c\u043c. \u041d\u043e \u043a\u0430\u043a \u0436\u0435 \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0431\u0435\u0437 hashCode()? \u041c\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u2014 \u043d\u0435 \u0437\u043d\u0430\u044e, \u043d\u043e \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f null hash=0. \u0412\u0438\u0434\u0438\u043c\u043e \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. <\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u0441\u0435 \u0431\u0435\u0437 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432, \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 hash=0 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0442\u0443 \u0436\u0435 \u00ab\u043a\u043e\u0440\u0437\u0438\u043d\u0443\u00bb.  <\/p>\n<pre><code class=\"java\">map.put(0,  &quot;0&quot;); System.out.println(map.size()); \/\/ \u0432\u044b\u0432\u043e\u0434: 2 <\/code><\/pre>\n<p>  <b>\u041e\u0442\u0432\u0435\u0442 \u21161: HashMap \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441 null-\u043a\u043b\u044e\u0447\u043e\u043c \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0415\u0433\u043e hash \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u0435\u043d 0<\/b> <\/p>\n<h6>TreeMap<\/h6>\n<p>  <\/p>\n<pre><code class=\"java\">Map map = new TreeMap(); map.put(null,  &quot;null&quot;); \/\/ \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u0442\u0438\u043d\u044b ... \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442! <\/code><\/pre>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438  <\/p>\n<pre><code class=\"java\">System.out.println(map.size()); \/\/ \u0432\u044b\u0432\u043e\u0434: 1 System.out.println(map.get(null)); \/\/ \u0411\u0410\u0411\u0410\u0425!! Exception in thread &quot;main&quot; java.lang.NullPointerException <\/code><\/pre>\n<p>  \u0410 \u0432\u0435\u0434\u044c \u0442\u0430\u043a \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c! \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438, \u043e\u043d\u043e \u0442\u0430\u043c \u043b\u0435\u0436\u0438\u0442 (size=1), \u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u043c. \u041d\u0443 \u043e\u043a, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u043c \u0432\u043e\u0432\u0441\u0435 \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c. \u0410 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u044c, \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043c\u044b \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u043e\u0431\u0443\u0435\u043c.  <\/p>\n<pre><code class=\"java\">Map map = new TreeMap(); map.put(null,  &quot;null&quot;); \/\/ \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442 System.out.println(map.size()); \/\/ \u0432\u044b\u0432\u043e\u0434: 1 map.put(0,  &quot;0&quot;); \/\/ \u0411\u0410\u0411\u0410\u0425!! Exception in thread &quot;main&quot; java.lang.NullPointerException <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u043e\u043c\u0435\u0441\u0442\u043d\u0430\u044f \u043c\u0430\u043f\u0430, \u043a\u0430\u043a\u0430\u044f-\u0442\u043e. \u0418\u043b\u0438 \u043d\u0435\u0442? \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0440\u0430\u043c\u044b, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u0441\u0442\u0430\u0432\u043a\u0438   <\/p>\n<pre><code class=\"java\">Map map = new TreeMap(); map.put(0,  &quot;0&quot;); \/\/ \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442  map.put(1,  1); \/\/ \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442  System.out.println(map.size()); \/\/ \u0432\u044b\u0432\u043e\u0434: 2 map.put(null,  &quot;null&quot;); \/\/ \u0411\u0410\u0411\u0410\u0425!! Exception in thread &quot;main&quot; java.lang.NullPointerException <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0447\u0442\u043e \u0436\u0435 \u0437\u0430 \u0440\u043e\u043c\u0430\u0448\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, null \u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?! \u0410 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0447\u0442\u043e. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u044e\u0447 null \u0432 \u043f\u0443\u0441\u0442\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u2014 \u043e\u043d \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 root. \u0410 root, \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438, \u043e\u043d \u0438 \u0432 \u0410\u0444\u0440\u0438\u043a\u0435 root, \u043e\u043d \u0440\u0430\u0432\u043d\u0435\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0447\u0438\u0445, \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 compareTo() \u0438 null \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0432\u043e\u0451 \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 \u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c, \u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u00ab\u0437\u0430\u043a\u043e\u043d\u043d\u044b\u0439\u00bb NPE. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0441\u043e\u0431\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f null \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e. <\/p>\n<p>  <b>\u041e\u0442\u0432\u0435\u0442 \u21162: \u0412 \u043f\u0443\u0441\u0442\u043e\u0439 TreeMap \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447-null, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043a\u0440\u043e\u043c\u0435 size() \u0438 clear(), \u043a\u0441\u0442\u0430\u0442\u0438) \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0412 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0439 TreeMap \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c null-\u043a\u043b\u044e\u0447 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437-\u0437\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 compareTo().<\/b> <\/p>\n<h5>2. \u041c\u043e\u0436\u0435\u0442 \u043b\u0438 Set \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c null?<\/h5>\n<p>  \u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Set, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Map. HashSet \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u00ab\u043d\u0430 \u0443\u0440\u0430\u00bb, TreeSet \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438: <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/162017\">Java \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/a> by <a href=\"http:\/\/habrahabr.ru\/users\/sphinks\/\" class=\"user_link\">sphinks<\/a> <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/65617\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445: \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u0427\u0430\u0441\u0442\u044c 1<\/a> by <a href=\"http:\/\/habrahabr.ru\/users\/winger\/\" class=\"user_link\">winger<\/a> <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/66926\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445: \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u0427\u0430\u0441\u0442\u044c 2: \u043e\u0431\u0437\u043e\u0440 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432<\/a> by <a href=\"http:\/\/habrahabr.ru\/users\/winger\/\" class=\"user_link\">winger<\/a>    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/164027\/\"> http:\/\/habrahabr.ru\/post\/164027\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>  \u0412 \u0442\u043e\u043f\u0438\u043a\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/162017\">Java \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Set &#038; Map \u0432 Java. \u041d\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\u041c\u043e\u0436\u0435\u0442 \u043b\u0438 <b>null<\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430 \u0432 Map?<\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u043b\u0438 Set \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c <b>null<\/b>?<\/li>\n<\/ol>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0442 \u043d\u0430\u0434 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0437\u0430\u0442\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442 \u0438\u0445 \u0441 \u043c\u043e\u0438\u043c\u0438. \u0421\u0430\u043c\u044b\u0435 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-164027","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=164027"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164027\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=164027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=164027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}