{"id":742,"date":"2022-02-25T08:32:31","date_gmt":"2022-02-25T08:32:31","guid":{"rendered":"http:\/\/happily70.dothome.co.kr\/?p=742"},"modified":"2022-03-26T07:38:36","modified_gmt":"2022-03-26T07:38:36","slug":"%ec%9e%90%ec%a3%bc-%ec%82%ac%ec%9a%a9%ed%96%88%eb%8d%98-%ec%bd%94%eb%93%9c","status":"publish","type":"post","link":"https:\/\/happily70.dothome.co.kr\/?p=742","title":{"rendered":"\uc790\uc8fc \uc0ac\uc6a9\ud588\ub358 \ucf54\ub4dc"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Stream\uacfc Distinct\ub97c \ud65c\uc6a9\ud55c \uc911\ubcf5\uc81c\uac70<\/h3>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">** List&lt;Object>\uc77c \uacbd\uc6b0\uc5d0\ub294 Object\uc758 hash\uac00 \ub2e4\ub97c \uc218 \uc788\uc73c\ubbc0\ub85c distinct \ud558\uc5ec\ub3c4 \uc911\ubcf5\ub41c \uac12\uc774 \uac78\ub7ec\uc9c0\uc9c0 \uc54a\uc744 \uc218 \uc788\uc74c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">private void checkDuplicated(List&lt;Integer&gt; list) {\n  list = list.stream().distinct.sorted.collect(Collectors.toList());\n  list.forEach(i -&gt; System.out.print(i));\n}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Map \ub0b4 Key, Value \uccb4\ud06c\uac00 \ud544\uc694\ud560\ub54c<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">private void printKeyValue(Map&lt;String, Object&gt; map) {\n   map.forEach((key, value) -&gt; System.out.println(key + \" : \" + value + \"\\n\"));\n}<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stream\uacfc Distinct\ub97c \ud65c\uc6a9\ud55c \uc911\ubcf5\uc81c\uac70 ** List&lt;Object>\uc77c \uacbd\uc6b0\uc5d0\ub294 Object\uc758 hash\uac00 \ub2e4\ub97c \uc218 \uc788\uc73c\ubbc0\ub85c distinct \ud558\uc5ec\ub3c4 \uc911\ubcf5\ub41c \uac12\uc774 \uac78\ub7ec\uc9c0\uc9c0 \uc54a\uc744 \uc218 \uc788\uc74c. private void checkDuplicated(List&lt;Integer&gt; list) { list = list.stream().distinct.sorted.collect(Collectors.toList()); list.forEach(i -&gt; System.out.print(i)); } Map \ub0b4 Key, Value \uccb4\ud06c\uac00 \ud544\uc694\ud560\ub54c private void printKeyValue(Map&lt;String, Object&gt; map) { map.forEach((key, value) -&gt; System.out.println(key + &#8221; : &#8221; + value +<\/p>\n<footer class=\"entry-footer index-entry\">\n<div class=\"post-social pull-left\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D742\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-facebook\" aria-hidden=\"true\"><\/i><\/a><a href=\"https:\/\/twitter.com\/home?status=https%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D742\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-twitter\" aria-hidden=\"true\"><\/i><\/a><a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D742&#038;title=%EC%9E%90%EC%A3%BC+%EC%82%AC%EC%9A%A9%ED%96%88%EB%8D%98+%EC%BD%94%EB%93%9C\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-linkedin\" aria-hidden=\"true\"><\/i><\/a><\/div>\n<p class=\"link-more\"><a href=\"https:\/\/happily70.dothome.co.kr\/?p=742\" class=\"more-link\">Continue reading <span class=\"meta-nav\">\u2192<\/span><\/a><\/p>\n<\/footer>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-742","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/742"}],"collection":[{"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=742"}],"version-history":[{"count":3,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/742\/revisions"}],"predecessor-version":[{"id":748,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/742\/revisions\/748"}],"wp:attachment":[{"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}