{"id":313544,"date":"2020-11-21T21:01:54","date_gmt":"2020-11-21T21:01:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313544"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313544","title":{"rendered":"\u0421\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 Backend-Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b. \u0427\u0430\u0441\u0442\u044c 1"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/za\/zu\/y0\/zazuy0hba1v-ng8d9xebitr8w7k.jpeg\"><\/div>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u0441\u0435\u0440\u0438\u044e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 Backend-Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u0435\u0431\u0435 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u043e\u0434\u0443\u043c\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0443\u043b \u0441 \u043d\u0435\u0433\u043e \u043f\u044b\u043b\u044c, \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0434\u0435\u043b\u044e\u0441\u044c \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c. \u041d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e: \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0438 \u043c\u043d\u043e\u0433\u043e \u0433\u0434\u0435 \u0435\u0449\u0451 \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 (\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438) \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 \u0431\u044b\u043b\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c \u2014 \u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u044b \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u043f\u043b\u044e\u0441-\u043c\u0438\u043d\u0443\u0441 middle, \u0449\u0435\u0434\u0440\u043e \u043f\u0440\u0438\u043f\u0440\u0430\u0432\u0438\u0432 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0439. \u041d\u0430 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0425\u0430\u0431\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a \u0441\u043e\u0431\u0435\u0441\u0430\u043c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e Java \u0438 Spring, \u0430 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u2014 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/529214\/\">\u0442\u0443\u0442<\/a><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TL;DR<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>GitHub-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/jmorozov\/awesome-java-backend-interview\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>, \u0430 \u0425\u0430\u0431\u0440 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0442\u043e\u0440\u0442.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"voprosy\">\u0412\u043e\u043f\u0440\u043e\u0441\u044b<\/h2>\n<p>  <\/p>\n<h3 id=\"java\">Java<\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">1. \u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e Equals, hashcode \u0438 \u0438\u0445 \u0441\u0432\u044f\u0437\u044c \u0441 HashMap.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 <code>HashMap<\/code>. \u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438? \u0410 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438? \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0447\u0442\u0435\u043d\u0438\u044f, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u043f\u044b. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u2014 \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442\u043e\u0432? \u0410 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043c\u0430\u043f\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043c? \u041e\u0431\u0441\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u0431\u0435\u0434\u043d\u0443\u044e \u043c\u0430\u043f\u0443 \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u0421\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f. \u0421\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u0435. \u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 <code>equals<\/code> \u0438 <code>hashcode<\/code>:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0414\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0445\u044d\u0448\u043a\u043e\u0434\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0432\u043d\u044b \u043f\u043e equals, \u0442\u043e \u0438 \u0445\u044d\u0448\u043a\u043e\u0434\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0445\u044d\u0448\u043a\u043e\u0434\u044b \u0440\u0430\u0432\u043d\u044b, \u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u043f\u043e equals (\u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044f).<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0445\u044d\u0448\u043a\u043e\u0434\u044b \u0440\u0430\u0437\u043d\u044b\u0435, \u0442\u043e \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0437\u043d\u044b\u0435.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/168195\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u044d\u0442\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043e, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u0430\u043b\u043e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e <code>HashMap<\/code> \u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043d\u0438\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (<a href=\"https:\/\/habr.com\/ru\/post\/128017\/\">\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/421179\/\">\u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 Java 8<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/162017\/\">\u0430 \u0442\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043e\u0442\u0432\u0435\u0442\u044b \u043f\u0440\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c<\/a>). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0432\u0430\u0448\u0435\u0439 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 IDE. \u041c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0431\u0435 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0435\u043d\u0443 \ud83d\ude42<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">2. \u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e \u0441\u043f\u0438\u0441\u043a\u0438: \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443, \u0432 \u043a\u043e\u043d\u0435\u0446, \u0432 \u043e\u0433\u0443\u0440\u0435\u0446.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u043e <code>ArrayList<\/code> vs <code>LinkedList<\/code>. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0437\u0430\u0435\u0437\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u043a\u0430, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/162017\/\">\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043e\u0442\u0432\u0435\u0442\u044b \u043f\u0440\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/128269\/\">ArrayList \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/127864\/\">LinkedList \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/337558\/\">\u0427\u0442\u043e \u00ab\u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c\u00bb \u0443 LinkedList<\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u0442\u0430\u043d\u0443\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u0432 <code>ArrayList<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>System.arraycopy<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u043a\u0430\u043a \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">3. \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 `Object`.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u0430\u0435\u0442 \u043b\u0438\u0431\u043e \u0432 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 <code>HashMap<\/code>, \u043b\u0438\u0431\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u044b \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Java.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u044f :D), \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0432\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/docs\/api\/java.base\/java\/lang\/Object.html\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 JavaDoc<\/a>:<\/p>\n<p>  <\/p>\n<ul>\n<li>clone<\/li>\n<li>equals<\/li>\n<li>finalize (Deprecated)<\/li>\n<li>getClass<\/li>\n<li>hashCode<\/li>\n<li>toString<\/li>\n<li>notify<\/li>\n<li>notifyAll<\/li>\n<li>wait<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0441\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 <code>Object<\/code> \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/265373\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">4. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u043e \u043c\u0435\u0442\u043e\u0434\u044b `wait`, `notify`, `notifyAll` \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e `synchronized`.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 <a href=\"https:\/\/www.baeldung.com\/java-wait-notify\" rel=\"nofollow\">Baeldung<\/a> \u0434\u043e\u043b\u0436\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u0442\u044c. \u041b\u0443\u0447\u0448\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>wait<\/code>, <code>notify<\/code>, <code>notifyAll<\/code> \u0438 <code>synchronized<\/code> \u0440\u0443\u043a\u0430\u043c\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/essential\/concurrency\/index.html\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b<\/a> \u043e\u0442 Oracle \u043f\u043e Concurrency \u0432 Java.<br \/>  \u041d\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0439\u0442\u0438 \u0433\u043b\u0443\u0431\u0436\u0435, \u0442\u043e \u0445\u0430\u0431\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u0441\u043f\u0435\u0448\u0430\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/143237\/\">\u0442\u0443\u0442<\/a>. \u0410 \u0442\u0430\u043a\u0436\u0435 Java Language Specification, <a href=\"https:\/\/docs.oracle.com\/javase\/specs\/jls\/se7\/html\/jls-17.html\" rel=\"nofollow\">\u0440\u0430\u0437\u0434\u0435\u043b 17.1 \u0438 17.2<\/a>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">5. JMM. \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e volatile. \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041d\u0435 \u0437\u043d\u0430\u044e \u043a\u0430\u043a \u0443 \u0432\u0430\u0441, \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0438 JMM \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0435\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0428\u0438\u043f\u0438\u043b\u0451\u0432 \u0438 \u0435\u0433\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=noDnSV7NCtw\" rel=\"nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=Ky1_5mabd18\" rel=\"nofollow\">\u0434\u0432\u0430<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=C6b_dFtujKo\" rel=\"nofollow\">\u0442\u0440\u0438<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0442\u0435\u0446, \u0447\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0435\u0446, \u0442\u043e \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u2014 <a href=\"https:\/\/shipilev.net\/blog\/2014\/jmm-pragmatics\/\" rel=\"nofollow\">\u0430\u0442\u044c<\/a>, <a href=\"https:\/\/shipilev.net\/blog\/2016\/close-encounters-of-jmm-kind\/\" rel=\"nofollow\">\u0434\u0432\u0430<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=hxIRyqHRnjE&amp;list=PLU17dD8nR0m7GusjRbl42KE94a3dlpx_a&amp;index=3&amp;t=0s\" rel=\"nofollow\">\u0434\u043e\u043a\u043b\u0430\u0434<\/a> \u0420\u043e\u043c\u0430\u043d\u0430 \u0415\u043b\u0438\u0437\u0430\u0440\u043e\u0432\u0430 \u043f\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 JMM.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <a href=\"http:\/\/www.javaspecialist.ru\/2011\/06\/java-memory-model.html\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u0435\u0439\u043a\u0435<\/a> \u043f\u043e JMM. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u0442\u043e\u0433\u0434\u0430 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0435\u043c\u0441\u044f \u0432 \u0442\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/habr.com\/ru\/post\/440590\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0410 \u0435\u0449\u0451 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c. Java-\u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438&quot;: <a href=\"https:\/\/habr.com\/ru\/post\/510454\/\">\u0447\u0430\u0441\u0442\u044c 1<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/510618\/\">\u0447\u0430\u0441\u0442\u044c 2<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0438\u0441\u0442\u0438\u043d\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Java Language Specification, <a href=\"https:\/\/docs.oracle.com\/javase\/specs\/jls\/se7\/html\/jls-17.html\" rel=\"nofollow\">\u0440\u0430\u0437\u0434\u0435\u043b 17.4<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/itsobes.ru\/JavaSobes\/chto-delaet-volatile\/\" rel=\"nofollow\">\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c<\/a> \u043d\u0430 itsobes.ru.<br \/>  \u041d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 JVM-\u0443\u0440\u043e\u0432\u043d\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/medium.com\/@dredwardhyde\/how-volatile-works-on-jvm-level-7a250d38435d\" rel=\"nofollow\">How \u2018volatile\u2019 works on JVM level?<\/a> \u043d\u0430 Medium.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">6. \u0421\u0431\u043e\u0440\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u041a\u0430\u043a\u0438\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0438 \u0437\u043d\u0430\u0435\u0442\u0435? \u041a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 JVM? \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0430 \u043a\u043e\u0433\u043e \u0438 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b &#8212; \u043a\u0430\u043a \u0441 \u043d\u0438\u043c\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u0438 \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u0430\u043c\u044f\u0442\u044c \u0432 Java \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 Stack \u0438 Heap.<\/p>\n<p>  <\/p>\n<p>Stack \u2014 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 LIFO. \u0421\u044e\u0434\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f frame \u2014 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0435\u043a\u0435, \u0430 \u0432\u043e\u0442 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0430, \u0430 \u0441\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 Heap. \u041d\u041e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Escape Analysis \u0438 \u0441\u043a\u0430\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 Java 6, \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435. \u041f\u0440\u043e Escape Analysis \u0438 \u0441\u043a\u0430\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0435\u0441\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 (<a href=\"https:\/\/www.youtube.com\/watch?v=K6c3W6vhQOA\" rel=\"nofollow\">\u0432\u0438\u0434\u0435\u043e<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/322348\/\">\u0442\u0435\u043a\u0441\u0442<\/a>) \u0420\u0443\u0441\u043b\u0430\u043d\u0430 \u0427\u0435\u0440\u0435\u043c\u0438\u043d\u0430, \u0438\u043b\u0438 \u0435\u0449\u0451 <a href=\"https:\/\/www.beyondjava.net\/escape-analysis-java\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  <\/p>\n<p>Frame \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438 \u043a\u043b\u0430\u0434\u0451\u0442\u0441\u044f \u043d\u0430 Stack \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. Frame \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0431\u0440\u043e\u0441\u0430 \u043d\u0435\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 Stack \u0438 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/docs.oracle.com\/javase\/specs\/jvms\/se13\/html\/jvms-2.html#jvms-2.5.5\" rel=\"nofollow\">JVM Specification<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e Heap \u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430. \u0422\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 <a href=\"https:\/\/t.me\/seniorsITBlog\/61\" rel=\"nofollow\">\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/a> telegram-\u043a\u0430\u043d\u0430\u043b\u0430 Senior&#8217;s Blog. \u041f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0437\u0434\u0435\u0441\u044c:<\/p>\n<p>  <\/p>\n<blockquote><p>Heap \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>Young Generation<br \/> \n<ol>\n<li>Eden<\/li>\n<li>Survivor 0 \u0438 Survivor 1<\/li>\n<\/ol>\n<p>   <\/li>\n<li>Old Generation<br \/> \n<ol>\n<li>Tenured<\/li>\n<\/ol>\n<p>   <\/li>\n<\/ol>\n<p>  Young \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0442\u0440\u0438 \u0447\u0430\u0441\u0442\u0438: Eden, Survivor 0 \u0438 Survivor 1. \u0412 Eden \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u041e\u0434\u0438\u043d \u0438\u0437 Survivor \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0443\u0441\u0442\u043e\u0439. \u041f\u0440\u0438 \u043f\u043e\u043b\u043d\u043e\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 Eden \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043b\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430, \u0438 \u0432\u0441\u0435 \u0436\u0438\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0437 Eden \u0438 Survivor \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0443\u0441\u0442\u043e\u0439 Survivor, \u0430 Eden \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439\u0441\u044f Survivor \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 Survivor, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 Tenured.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0443\u0436\u0435 \u0432 Tenured, \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0440\u0448\u0435\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0440\u0435\u0433\u0438\u043e\u043d\u044b \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043c\u043b\u0430\u0434\u0448\u0438\u043c, \u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0441\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 Tenured \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0443\u0436\u0435 \u043d\u0435\u043a\u0443\u0434\u0430), \u0430 \u0438\u0445 \u0443\u043f\u043b\u043e\u0442\u043d\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0435\u0437 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Mark-Sweep-Compact \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0435\u0433\u043e \u0448\u0430\u0433\u043e\u0432 (\u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0442 \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0443\u043f\u043b\u043e\u0442\u043d\u0438\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b).<\/p>\n<p>  \u0411\u044b\u0432\u0430\u044e\u0442 \u0435\u0449\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b-\u0430\u043a\u0441\u0435\u043b\u0435\u0440\u0430\u0442\u044b, \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043b\u0438\u043a, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 Eden, \u0430 \u043f\u043e\u0442\u043e\u043c \u0442\u0430\u0441\u043a\u0430\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e Survivor\u2019\u0430\u043c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u043e. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0432 Tenured.<\/p>\n<p>  \u041c\u043b\u0430\u0434\u0448\u0435\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435\u0439 \u043a\u0443\u0447\u0438, \u0430 \u0441\u0442\u0430\u0440\u0448\u0435\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u0432\u0435 \u0442\u0440\u0435\u0442\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d Survivor \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0434\u0435\u0441\u044f\u0442\u0443\u044e \u043c\u043b\u0430\u0434\u0448\u0435\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c Eden \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u0441\u0435\u043c\u044c \u0434\u0435\u0441\u044f\u0442\u044b\u0445.  <\/p><\/blockquote>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 GC:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/gctuning\/available-collectors.html#GUID-45794DA6-AB96-4856-A96D-FDE5F7DEE498\" rel=\"nofollow\">Serial Garbage Collector<\/a><\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/gctuning\/parallel-collector1.html#GUID-DCDD6E46-0406-41D1-AB49-FB96A50EB9CE\" rel=\"nofollow\">Parallel Garbage Collector<\/a>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Java 8.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/gctuning\/concurrent-mark-sweep-cms-collector.html#GUID-FF8150AC-73D9-4780-91DD-148E63FA1BFF\" rel=\"nofollow\">Concurrent Mark Sweep<\/a> (CMS). Deprecated \u0441 Java 9.<\/li>\n<li><a href=\"https:\/\/www.oracle.com\/technetwork\/tutorials\/tutorials-1876574.html\" rel=\"nofollow\">Garbage-First<\/a> (G1). <a href=\"http:\/\/openjdk.java.net\/jeps\/248\" rel=\"nofollow\">\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a> \u0441 Java 9. \u0415\u0441\u0442\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=iGRfyhE02lA\" rel=\"nofollow\">\u0432\u0438\u0434\u0435\u043e<\/a> \u043e\u0442 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u0430. \u0415\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e G1 \u0432 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/gctuning\/garbage-first-garbage-collector.html#GUID-ED3AB6D3-FD9B-4447-9EDF-983ED2F7A573\" rel=\"nofollow\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435<\/a> \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u0442 Oracle.<\/li>\n<li><a href=\"http:\/\/openjdk.java.net\/jeps\/333\" rel=\"nofollow\">Z Garbage Collector<\/a> (ZGC)<\/li>\n<li><a href=\"https:\/\/wiki.openjdk.java.net\/display\/shenandoah\/Main\" rel=\"nofollow\">Shenandoah<\/a> Garbage Collector. \u0415\u0441\u0442\u044c \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0441 Java 12. \u0422\u0443\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=JBaZ4lK6OBk\" rel=\"nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=HBWaffsl7fo\" rel=\"nofollow\">\u0434\u0432\u0430<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"http:\/\/java-online.ru\/garbage-collection.xhtml\" rel=\"nofollow\">\u0442\u0443\u0442<\/a> \u0438 \u0432\u043e\u0442 <a href=\"https:\/\/dzone.com\/articles\/jvm-architecture-explained\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>.<br \/>  \u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 Java \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 &quot;\u0414\u044e\u043a, \u0432\u044b\u043d\u0435\u0441\u0438 \u043c\u0443\u0441\u043e\u0440!&quot; \u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/users\/alygin\/\" class=\"user_link\">alygin<\/a> \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/269621\/\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/269707\/\">\u0434\u0432\u0430<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/269863\/\">\u0442\u0440\u0438<\/a>.<br \/>  \u041f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430\u0445 \u043c\u0443\u0441\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"http:\/\/podlodka.io\/74\" rel=\"nofollow\">\u0432\u044b\u043f\u0443\u0441\u043a\u0435 74<\/a> \u043f\u043e\u0434\u043a\u0430\u0441\u0442\u0430 Podlodka \u0441 \u0410\u043b\u0435\u043a\u0441\u0435\u0435\u043c \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u043e\u043c \u0432 \u0433\u043e\u0441\u0442\u044f\u0445. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043a \u0432\u044b\u043f\u0443\u0441\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/javapapers.com\/core-java\/java-jvm-run-time-data-areas\/#Method_Area\" rel=\"nofollow\">Method Area<\/a> \u2014 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f. \u041e\u0434\u043d\u0430 \u043d\u0430 \u0432\u0441\u044e JVM.<\/li>\n<li><a href=\"https:\/\/javapapers.com\/core-java\/java-jvm-run-time-data-areas\/#Program_Counter_PC_Register\" rel=\"nofollow\">Program Counter (PC) Register<\/a> \u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/li>\n<li><a href=\"https:\/\/javapapers.com\/core-java\/java-jvm-run-time-data-areas\/#Java_Virtual_Machine_Stacks\" rel=\"nofollow\">Run-time Constant Pool<\/a> \u2014 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 Method Area \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0445\u0440\u0430\u043d\u0438\u0442 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b. <a href=\"https:\/\/blog.jamesdbloom.com\/JVMInternals.html#constant_pool\" rel=\"nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a>.<\/li>\n<li><a href=\"https:\/\/javapapers.com\/core-java\/java-jvm-run-time-data-areas\/#Java_Virtual_Machine_Stacks\" rel=\"nofollow\">Native Method Stack<\/a> \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e Stack \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e gc \u0438 \u0441\u0430\u043c\u0443 JVM (\u043e\u0445, \u0431\u043e\u0445\u0430\u0442\u0430\u044f \u0438 \u0436\u0438\u0432\u043e\u0442\u0440\u0435\u043f\u0435\u0449\u0443\u0449\u0430\u044f \u0442\u0435\u043c\u0430):<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/medium.com\/datadriveninvestor\/how-does-garbage-collection-work-in-java-da8f75ec6899\" rel=\"nofollow\">\u041d\u0430 \u0431\u043e\u0433\u043e\u043c\u0435\u0440\u0437\u043a\u043e\u043c medium<\/a> \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/443250\/\">\u041f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> <a href=\"https:\/\/shipilev.net\/jvm\/diy-gc\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u2014 \u0421\u0430\u043c\u043e\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0434\u043b\u044f OpenJDK<\/li>\n<li><a href=\"https:\/\/plumbr.io\/handbook\/garbage-collection-algorithms\/marking-reachable-objects\" rel=\"nofollow\">\u041e\u0442\u0440\u044b\u0432\u043e\u043a<\/a> \u0438\u0437 Java Garbage Collection Handbook \u043f\u0440\u043e reachability algorithm<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Tracing_garbage_collection\" rel=\"nofollow\">\u0421\u0442\u0430\u0442\u0435\u0439\u043a\u0430<\/a> \u043d\u0430 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 \u043f\u0440\u043e Tracing garbage collection<\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=e2lXj_t7ZBc\" rel=\"nofollow\">\u0414\u043e\u043a\u043b\u0430\u0434<\/a> Simone Bordet \u043f\u0440\u043e ZGC \u0438 Shenandoah<\/li>\n<li><a href=\"https:\/\/shipilev.net\/jvm\/anatomy-quarks\/\" rel=\"nofollow\">JVM Anatomy Quarks<\/a> \u2014 \u0441\u0435\u0440\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u0432 \u043e\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 \u043f\u0440\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e JVM. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u0430\u0434, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0435\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0448\u0435\u043b\u044c\u0446\u044b \u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u043f\u043e\u043a\u0430\u043b\u0438\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0417\u0435\u043c\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0433\u0430\u0434\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u0430 \u0447\u0451\u0440\u0442\u0432\u0430 \u0448\u0430\u0439\u0442\u0430\u043d-\u0432\u0438\u0440\u0442\u0443\u0430\u043b-\u043c\u0430\u0448\u0438\u043d\u0430 \u0438 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0447\u0438\u0432\u0448\u0438\u0445 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u0432.<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">7. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Executor \u0438 ExecutorService, Thread pool \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u044b?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0443\u0431\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u2014 \u0434\u043e\u0440\u043e\u0433\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c N \u043f\u043e\u0442\u043e\u043a\u043e\u0432 (Thread pool) \u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435. \u0412\u043e\u0442 <a href=\"https:\/\/www.ibm.com\/developerworks\/ru\/library\/j-jtp0730\/index.html\" rel=\"nofollow\">\u0442\u0443\u0442<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u043e.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/docs\/api\/java.base\/java\/util\/concurrent\/Executor.html\" rel=\"nofollow\">Executor<\/a> (<code>void execute\u200b(Runnable command)<\/code> \u2014 \u0432\u043e\u0442 \u0438 \u0432\u0435\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441) \u0438 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/docs\/api\/java.base\/java\/util\/concurrent\/ExecutorService.html\" rel=\"nofollow\">ExecutorService<\/a> (\u0443\u0436\u0435 \u043f\u043e\u043a\u0440\u0443\u0447\u0435, \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Callable \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u2014 \u0433\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u043e\u0440\u043e\u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0410 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u043e\u0440\u044b \u043d\u0430 \u043f\u0443\u043b\u0430\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u043e\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/13\/docs\/api\/java.base\/java\/util\/concurrent\/Executors.html\" rel=\"nofollow\">Executors<\/a>. \u0415\u0441\u043b\u0438 \u0441\u043c\u0435\u043b\u044b\u0439-\u0443\u043c\u0435\u043b\u044b\u0439 \u0438 \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043d\u0430\u0434\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/326146\/\">C\u0442\u0430\u0442\u044c\u044e<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li>\u041d\u0430 Baeldung: <a href=\"https:\/\/www.baeldung.com\/java-executor-service-tutorial\" rel=\"nofollow\">\u0440\u0430\u0437<\/a> \u0438 <a href=\"https:\/\/www.baeldung.com\/thread-pool-java-and-guava\" rel=\"nofollow\">\u0434\u0432\u0430<\/a><\/li>\n<li>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/essential\/concurrency\/executors.html\" rel=\"nofollow\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b<\/a> \u043e\u0442 Oracle<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">8. \u041c\u043e\u0433\u0443\u0442 \u043b\u0438 \u0431\u044b\u0442\u044c \u0432 Java \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043a\u043e\u0433\u0434\u0430? \u041a\u0430\u043a \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443? \u041a\u0430\u043a \u0441\u043d\u044f\u0442\u044c heap-dump?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041c\u043e\u0433\u0443\u0442. \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0421\u043d\u0438\u043c\u0430\u0442\u044c heap-dump, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/specs\/man\/jmap.html\" rel=\"nofollow\">jmap<\/a>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 memory profiler (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 <a href=\"https:\/\/visualvm.github.io\/\" rel=\"nofollow\">VisualVM<\/a>)<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043e \u043d\u0430 <a href=\"https:\/\/www.baeldung.com\/java-memory-leaks\" rel=\"nofollow\">Baeldung<\/a> \u0438\u043b\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 <a href=\"https:\/\/topjava.ru\/blog\/java-memory-leaks\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>, \u043d\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0440\u043e\u0434\u043d\u044b\u0445 \u043e\u0441\u0438\u043d.<\/li>\n<li>\u0415\u0449\u0451 <a href=\"https:\/\/www.toptal.com\/java\/hunting-memory-leaks-in-java\" rel=\"nofollow\">\u0442\u0443\u0442<\/a><\/li>\n<li><a href=\"https:\/\/dzone.com\/articles\/memory-leak-andjava-code\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/li>\n<li>\u0421\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/post\/132500\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 Java<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/324144\/\">\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 Java<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/519830\/\">\u0418\u0449\u0435\u043c \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Eclipse MAT<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.ibm.com\/developerworks\/ru\/library\/j-jtp11225\/index.html\" rel=\"nofollow\">\u0423\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a<\/a><\/li>\n<li><a href=\"https:\/\/www.ibm.com\/developerworks\/ru\/library\/j-jtp01246\/index.html\" rel=\"nofollow\">\u0423\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0433\u0438\u0431\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/byvaiut-li-v-java-utechki-pamiati\/\" rel=\"nofollow\">\u0411\u044b\u0432\u0430\u044e\u0442 \u043b\u0438 \u0432 Java \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438?<\/a><\/li>\n<li><a href=\"http:\/\/bazhenov.me\/blog\/2009\/12\/20\/out-of-memory-error.html\" rel=\"nofollow\">\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 OutOfMemoryError \u043f\u043e\u0434\u0440\u0443\u0447\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/technotes\/guides\/visualvm\/heapdump.html\" rel=\"nofollow\">Java VisualVM \u2014 Browsing a Heap Dump<\/a><\/li>\n<li><a href=\"https:\/\/shipilev.net\/blog\/archive\/visualvm\/\" rel=\"nofollow\">VisualVM: \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433, \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a><\/li>\n<li>\u0414\u043e\u043a\u043b\u0430\u0434 \u0410\u043d\u0434\u0440\u0435\u044f \u041f\u0430\u043d\u044c\u0433\u0438\u043d\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=0pyZERLBZvQ&amp;feature=emb_logo\" rel=\"nofollow\">\u0412\u0441\u0451, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e \u0441\u0442\u0435\u043a-\u0442\u0440\u0435\u0439\u0441\u0430\u0445 \u0438 \u0445\u0438\u043f-\u0434\u0430\u043c\u043f\u0430\u0445<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-heap-dump-capture\" rel=\"nofollow\">Different Ways to Capture Java Heap Dumps<\/a><\/li>\n<li><a href=\"https:\/\/www.jetbrains.com\/help\/idea\/analyze-hprof-memory-snapshots.html\" rel=\"nofollow\">Analyze memory snapshots<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e IntelliJ IDEA<\/li>\n<li><a href=\"https:\/\/www.jetbrains.com\/help\/idea\/analyze-objects-in-the-jvm-heap.html\" rel=\"nofollow\">Analyze objects in the JVM heap<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e IntelliJ IDEA<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">9. \u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u0438\u043c\u043e\u0432? \u041d\u0430 \u043a\u0430\u043a\u043e\u043c \u043f\u0443\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0438\u043c\u044b \u0438 \u0432 \u0447\u0435\u043c \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e parallel stream \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ForkJoinPool.html#commonPool--\" rel=\"nofollow\">ForkJoinPool.commonPool<\/a> \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c <code>Runtime.getRuntime().availableProcessors() \u2014 1<\/code>. Common pool \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a <code>ForkJoinPool<\/code> \u0438 \u0436\u0438\u0432\u0451\u0442 \u0434\u043e <code>System::exit<\/code> (\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 <code>shutdown()<\/code> \u0438\u043b\u0438 <code>shutdownNow()<\/code>). \u041a\u043e\u0433\u0434\u0430 \u043d\u0435\u043a\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 common pool, \u0442\u043e pool \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0436\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u0430. Common pool \u043e\u0434\u0438\u043d \u043d\u0430 \u0432\u0441\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c stream \u043d\u0430 <a href=\"https:\/\/www.baeldung.com\/java-8-parallel-streams-custom-threadpool\" rel=\"nofollow\">\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c<\/a> <code>ForkJoinPool<\/code> \u2014 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 stream \u0432 <code>Callable<\/code> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0443 <code>submit<\/code> \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e <code>ForkJoinPool<\/code>. \u042d\u0442\u043e\u0442 \u0442\u0440\u044e\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u0435\u0442\u043e\u0434\u0443 <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ForkJoinTask.html#fork--\" rel=\"nofollow\">fork()<\/a> \u0438\u0437 <code>ForkJoinPool<\/code> (<a href=\"https:\/\/blog.krecan.net\/2014\/03\/18\/how-to-specify-thread-pool-for-java-8-parallel-streams\/\" rel=\"nofollow\">\u0442\u0443\u0442<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438).<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ForkJoinPool.html\" rel=\"nofollow\">ForkJoinPool<\/a> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ExecutorService.html\" rel=\"nofollow\">ExecutorService<\/a>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0443\u044e <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ForkJoinTask.html\" rel=\"nofollow\">ForkJoinTask<\/a> (<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/RecursiveAction.html\" rel=\"nofollow\">RecursiveAction<\/a> \u0438 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/RecursiveTask.html\" rel=\"nofollow\">RecursiveTask<\/a>). \u0414\u0430\u043d\u043d\u044b\u0439 pool \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0440\u043e\u0434\u0438\u0432\u0448\u0438\u0445 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. <code>ForkJoinPool<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Work_stealing\" rel=\"nofollow\">work stealing<\/a> \u2014 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0435\u0441\u0442\u044c \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u0447, \u0438\u0437 \u0445\u0432\u043e\u0441\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0442\u044b\u0440\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0438\u0445 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u0432\u043e\u0438. \u0423\u043a\u0440\u0430\u0434\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/338770\/\">Stream API &amp; ForkJoinPool<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/128985\/\">Fork\/Join Framework \u0432 Java 7<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=t0dGLFtRR9c\" rel=\"nofollow\">ForkJoinPool \u0432 Java 8<\/a><\/li>\n<li>\u0412 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 <a href=\"https:\/\/www.baeldung.com\/java-fork-join\" rel=\"nofollow\">Guide to the Fork\/Join Framework in Java<\/a> \u0438 <a href=\"https:\/\/www.baeldung.com\/java-work-stealing\" rel=\"nofollow\">Guide to Work Stealing in Java<\/a> \u043d\u0430 Baeldung<\/li>\n<li>JavaDoc \u043a <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/concurrent\/ForkJoinPool.html\" rel=\"nofollow\">ForkJoinPool<\/a><\/li>\n<li>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/dzone.com\/articles\/think-twice-using-java-8\" rel=\"nofollow\">Think Twice Before Using Java 8 Parallel Streams<\/a> \u043d\u0430 DZone<\/li>\n<li>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/www.jrebel.com\/blog\/parallel-java-streams\" rel=\"nofollow\">Java Parallel Streams Are Bad for Your Health!<\/a> \u0432 \u0431\u043b\u043e\u0433\u0435 JRebel<\/li>\n<li>\u0421 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u2014 <a href=\"https:\/\/java2blog.com\/java-8-parallel-stream\/\" rel=\"nofollow\">Java Parallel Stream<\/a><\/li>\n<li>\u0421 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u0432 <a href=\"https:\/\/blog.overops.com\/forkjoin-framework-vs-parallel-streams-vs-executorservice-the-ultimate-benchmark\/\" rel=\"nofollow\">How does the Fork\/Join framework act under different configurations?<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kak-rabotaiut-parallelnye-strimy\/\" rel=\"nofollow\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0438\u043c\u044b?<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">10. \u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0442\u0440\u0438\u043c\u0430\u0445? \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0442\u0440\u0438\u043c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0415\u0441\u0442\u044c 2 \u0432\u0438\u0434\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 Java <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/stream\/Stream.html\" rel=\"nofollow\"><code>Stream<\/code><\/a>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 (Intermediate) \u2014 <code>filter<\/code>, <code>map<\/code>, <code>sorted<\/code>, <code>peek<\/code> \u0438 \u0442.\u0434. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 <code>Stream<\/code>.<\/li>\n<li>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 (Terminal) \u2014 <code>collect<\/code>, <code>forEach<\/code>, <code>count<\/code>, <code>reduce<\/code>, <code>findFirst<\/code>, <code>anyMatch<\/code> \u0438 \u0442.\u0434. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0440\u0438\u043c\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/stream\/package-summary.html\" rel=\"nofollow\">java.util.stream<\/a> \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438\u0437 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/stream\/Collectors.html\" rel=\"nofollow\">Collectors<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u044f\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0442\u0440\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u043f\u043e\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041c\u043e\u0436\u043d\u043e \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0435\u0441\u0442\u044c\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/konohiroaki\/java8-code-kata\/blob\/master\/readme.md\" rel=\"nofollow\">Java8 Code Kata<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Elqoo\/Experience-Java-8\/blob\/master\/src\/main\/java\/academy\/elqoo\/java8\/stream\/Stream8.java\" rel=\"nofollow\">Experience-Java-8<\/a><\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u0436\u0435 \u043a\u0443\u0440\u0441 \u2014 <a href=\"https:\/\/stepik.org\/course\/1595\/promo\" rel=\"nofollow\">Java. Functional programming<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0441\u0442\u0440\u0438\u043c\u044b \u043b\u0443\u0447\u0448\u0435 \u0432 Java Doc, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/howtodoinjava.com\/java8\/java-streams-by-examples\/\" rel=\"nofollow\">Java 8 Stream API<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-8-streams\" rel=\"nofollow\">The Java 8 Stream API Tutorial<\/a><\/li>\n<li><a href=\"https:\/\/annimon.com\/article\/2778\" rel=\"nofollow\">\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e Java 8 Stream API \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445<\/a>. \u0422\u0443\u0442 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445, \u0430 \u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u0445!<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/luxoft\/blog\/270383\/\">\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 Java \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 4. Java Stream API<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/307938\/\">Java Stream API: \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e, \u0430 \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/256905\/\">\u041f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 Spliterator<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0430 letsCode \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=RzEiCguFZiY\" rel=\"nofollow\">Java Stream API: \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e, \u043c\u043e\u0434\u043d\u043e, \u043c\u043e\u043b\u043e\u0434\u0451\u0436\u043d\u043e!<\/a><\/li>\n<li>\u041b\u0435\u043a\u0446\u0438\u044f \u0432 CSCenter \u043e\u0442 \u0422\u0430\u0433\u0438\u0440\u0430 \u0412\u0430\u043b\u0435\u0435\u0432\u0430 \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=Pk7atYm8bX0\" rel=\"nofollow\">\u041b\u0435\u043a\u0446\u0438\u044f 8. Stream API<\/a><\/li>\n<li>\u0414\u043e\u043a\u043b\u0430\u0434 \u0422\u0430\u0433\u0438\u0440\u0430 \u0412\u0430\u043b\u0435\u0435\u0432\u0430 \u043d\u0430 Joker 2016 \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=1_Zj3gS_a3E\" rel=\"nofollow\">\u041f\u0440\u0438\u0447\u0443\u0434\u044b Stream API<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">11. \u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0438\u0437 List&lt;? extends Number&gt;, \u0430 \u0447\u0442\u043e \u0441 List&lt;? super Number&gt;? \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u043d\u0442\u0440\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0422\u0443\u0442 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u043e PECS \u2014 Producer extends, Consumer super (Joshua Bloch, <a href=\"https:\/\/books.google.ru\/books?id=ka2VUBqHiWkC&amp;pg=PA136&amp;lpg=PA136&amp;dq=bloch+effective+java+pecs+mnemonic&amp;source=bl&amp;ots=yYKnPjt-P-&amp;sig=JGT8qexAAldJ5xYPepbBQ5uude0&amp;hl=en&amp;sa=X&amp;ei=Cb3GUv-sNIuK5ATM7oD4Dw&amp;ved=0CCgQ6AEwAA#v=onepage&amp;q=bloch%20effective%20java%20pecs%20mnemonic&amp;f=false\" rel=\"nofollow\">Effective Java<\/a>). \u0410 \u0442\u0430\u043a\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043e\u0442 \u043d\u0438\u0445 \u0442\u0438\u043f\u044b (\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b, \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u044f).<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c (covariance) \u2014 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043e\u0442 \u043d\u0438\u0445 \u0442\u0438\u043f\u044b \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<br \/>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <strong>List&lt;? <em>extends<\/em> T&gt;<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u043f\u0438\u0441\u043a\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <em>T<\/em> \u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043d\u043e \u043d\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c. \u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u0430 <strong>List&lt;? <em>extends<\/em> T&gt;<\/strong> \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 (\u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e <code>null<\/code>) \u2014 \u043d\u0435\u043b\u044c\u0437\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0438\u043f\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0442\u0438\u043f\u0430 <em>T<\/em> \u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c \u043b\u0438\u0431\u043e <em>T<\/em>, \u043b\u0438\u0431\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 <em>T<\/em>.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <code>List&lt;? extends Number&gt;<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <code>ArrayList&lt;Number&gt;<\/code> \u0438\u043b\u0438 <code>ArrayList&lt;Integer&gt;<\/code>, \u043d\u043e \u043d\u0435 <code>ArrayList&lt;Object&gt;<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>get<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Number<\/code>, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>Integer<\/code> \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 <code>Number<\/code>.<br \/>  \u041c\u0430\u0441\u0441\u0438\u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b.<br \/>  \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Java 5, \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0438\u043f\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p><code>List&lt;?&gt;<\/code> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d <code>List&lt;? extends Object&gt;<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u044b\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c (contravariance) \u2014 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043e\u0442 \u043d\u0438\u0445 \u0442\u0438\u043f\u044b \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<br \/>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <strong>List&lt;? <em>super<\/em> T&gt;<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u043f\u0438\u0441\u043a\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <em>T<\/em> \u0438\u043b\u0438 \u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043d\u043e \u043d\u0435 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u043c. \u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u0430 <strong>List&lt;? <em>super<\/em> T&gt;<\/strong> \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <em>T<\/em> \u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u043b\u044f <em>T<\/em> \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0418\u0437 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <code>Object<\/code>, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u0430\u043a\u043e\u0439 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <code>List&lt;? super Number&gt;<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043b\u0438\u0431\u043e <code>ArrayList&lt;Number&gt;<\/code>, \u043b\u0438\u0431\u043e <code>ArrayList&lt;Object&gt;<\/code>, \u043d\u043e \u043d\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 <code>Number<\/code>(\u0442.\u0435. \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <code>ArrayList&lt;Integer&gt;<\/code>). \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>Integer<\/code> \u0438\u043b\u0438 <code>Double<\/code> (\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b <code>Number<\/code>, \u043d\u043e \u043e\u043d \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439), \u043d\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u2014 <code>Object<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>get<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Object<\/code> \u2014 \u0442\u043e\u0447\u043d\u0435\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435.<br \/>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <strong>List&lt;T&gt;<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u043f\u0438\u0441\u043a\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e <em>T<\/em>. \u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <em>T<\/em> \u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430. \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>T<\/em>, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <code>List&lt;Number&gt;<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <code>ArrayList&lt;Number&gt;<\/code>, \u043d\u043e \u043d\u0435 <code>ArrayList&lt;Integer&gt;<\/code> \u0438\u043b\u0438 <code>ArrayList&lt;Object&gt;<\/code>. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>Integer<\/code> \u0438\u043b\u0438 <code>Double<\/code> (\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b <code>Number<\/code>, \u043d\u043e \u043e\u043d \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439), \u043d\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u2014 <code>Object<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>get<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Number<\/code>, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>Integer<\/code> \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 <code>Number<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0430 \u0425\u0430\u0431\u0440\u0435: <a href=\"https:\/\/habr.com\/ru\/company\/sberbank\/blog\/416413\/\">\u041f\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0432 Generics<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/207360\/\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 API<\/a>, \u0438\u0437\u0443\u0447\u0430\u0435\u043c <a href=\"https:\/\/habr.com\/ru\/post\/218753\/\">\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<\/a><\/li>\n<li>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430 \u041c\u0430\u0442\u043e\u0440\u0438\u043d\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=_0c9Fd9FacU&amp;feature=youtu.be&amp;t=1204\" rel=\"nofollow\">\u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0414\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438<\/a><\/li>\n<li>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 <a href=\"http:\/\/www.angelikalanger.com\/GenericsFAQ\/FAQSections\/TypeArguments.html#FAQ103\" rel=\"nofollow\">Generics FAQ<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kak-ogranichivaetsia-tip-generic-parametra\/\" rel=\"nofollow\">\u041a\u0430\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0438\u043f generic \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430?<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/chto-takoe-kovariantnost-i-kontravariantnost\/\" rel=\"nofollow\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c?<\/a><\/li>\n<li>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 StackOverflow: <a href=\"https:\/\/stackoverflow.com\/questions\/4343202\/difference-between-super-t-and-extends-t-in-java\" rel=\"nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/stackoverflow.com\/questions\/2776975\/how-can-i-add-to-list-extends-number-data-structures\/2777297#2777297\" rel=\"nofollow\">\u0434\u0432\u0430<\/a>, <a href=\"https:\/\/stackoverflow.com\/questions\/2723397\/what-is-pecs-producer-extends-consumer-super\" rel=\"nofollow\">\u0442\u0440\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habibutsu.github.io\/variance.html\" rel=\"nofollow\">\u041a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/a> \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u0442\u0435\u043e\u0440\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Covariance_and_contravariance_(computer_science)\" rel=\"nofollow\">\u041a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/a> \u0432 Wikipedia<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/generics\/wildcards.html\" rel=\"nofollow\">Wildcards<\/a> \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 Oracle<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">12. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 ConcurrentHashMap?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/ConcurrentHashMap.html\" rel=\"nofollow\">ConcurrentHashMap<\/a> \u2014 \u044d\u0442\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u043c\u0430\u043f\u0430 (\u043a\u0430\u0440\u0442\u0430, \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043d\u043e \u0442\u0443\u0442 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e &quot;\u043c\u0430\u043f\u0430&quot;), \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430 \u0432\u0441\u044e \u043c\u0430\u043f\u0443 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<br \/>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u043f\u044b (<code>Node&lt;K,V&gt;<\/code>) <code>val<\/code> (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435) \u0438 <code>next<\/code>(\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0438\u043b\u0438 \u0434\u0435\u0440\u0435\u0432\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 (<code>Node&lt;K,V&gt;[] table<\/code>) \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a <code>volatile<\/code><\/li>\n<li>\u0414\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0431\u0430\u043a\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Compare-and-swap\" rel=\"nofollow\">CAS<\/a> \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0430 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 (insert, delete, replace) \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/li>\n<li>\u041a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u043a\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043f\u0443\u0442\u0451\u043c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435<\/li>\n<li>\u0422\u0430\u0431\u043b\u0438\u0446\u0435 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f volatile\/atomic \u0447\u0442\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u044c \u0438 CAS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f intrinsics-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (<code>jdk.internal.misc.Unsafe<\/code>)<\/li>\n<li>Concurrent resizing \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0430\u043a\u0435\u0442\u043e\u0432<\/li>\n<li>\u041b\u0435\u043d\u0438\u0432\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0430\u043a\u0435\u0442\u043e\u0432<\/li>\n<li>\u041f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/LongAdder.html\" rel=\"nofollow\">LongAdder<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u0435\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043f\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f. \u0418\u043b\u0438 \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u0443\u044f, \u043b\u044e\u0431\u043e\u0439 <code>non-null<\/code> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 <code>get(key)<\/code> \u0441\u0432\u044f\u0437\u0430\u043d \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c <code>happens-before<\/code> \u0441\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443<\/li>\n<li>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u043e <code>ConcurrentHashMap<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0430\u043f\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u2014 \u043e\u043d\u0438 \u043d\u0435 \u0431\u0440\u043e\u0441\u0430\u044e\u0442 <code>ConcurrentModificationException<\/code>, \u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e<\/li>\n<li>\u041d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (<code>size<\/code>, <code>isEmpty<\/code>, <code>containsValue<\/code>), \u0435\u0441\u043b\u0438 \u043c\u0430\u043f\u0430 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445<\/li>\n<li>\u041d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>null<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435, \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u0441\u0435 (\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u0438\u0435) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u043f\u044b, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 <code>forEach<\/code>, <code>search<\/code>, <code>reduce<\/code> (bulk operations). \u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u043f\u0435 \u0438 \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u043c\u0438 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>forEach<\/code>). \u041d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 <code>parallelismThreshold<\/code> \u2014 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u043f\u044b \u043c\u0435\u043d\u044c\u0448\u0435 <code>parallelismThreshold<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>Long.MAX_VALUE<\/code> \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>1<\/code> \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c \u0438 \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>ForkJoinPool.commonPool()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/post\/132884\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u2014 \u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0438 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b \u0441 java 8 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041a\u043b\u0430\u0441\u0441 <code>Segment&lt;K,V&gt;<\/code> \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u0440\u0435\u0437\u0430\u043d \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. <code>concurrencyLevel<\/code> \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0443\u0436\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f <code>initialCapacity<\/code> \u0434\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432-\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u0430\u043f\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">if (initialCapacity &lt; concurrencyLevel)   \/\/ Use at least as many bins     initialCapacity = concurrencyLevel;   \/\/ as estimated threads<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/post\/327186\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ConcurrentMap. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/www.baeldung.com\/java-concurrent-map\" rel=\"nofollow\">\u0433\u0430\u0439\u0434<\/a> \u043f\u043e ConcurrentMap \u043d\u0430 Baeldung.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">13. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Xmx \u0438 Xms, Xss?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>JVM \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0441 <code>Xms<\/code> \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434 heap \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0435\u0451 \u0434\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Xmx<\/code>.<br \/>  <code>Xss<\/code> \u0444\u043b\u0430\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434 \u0441\u0442\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>  \u041e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">java -Xmx&lt;\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e&gt;&lt;\u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u044b (<code>k<\/code>), \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u044b (<code>m<\/code>) \u0438\u043b\u0438 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u044b (<code>g<\/code>).<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">java -jar my.jar -Xms256m -Xmx2048m<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412 <a href=\"https:\/\/mkyong.com\/java\/java-what-is-xms-and-xmx-parameter\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430 Mkyong<\/li>\n<li>\u0412 <a href=\"https:\/\/docs.oracle.com\/cd\/E21764_01\/web.1111\/e13814\/jvm_tuning.htm#PERFM150\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> Tuning JVM \u043e\u0442 Orcale<\/li>\n<li>\u0412 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/gctuning\/factors-affecting-garbage-collection-performance.html\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> Factors Affecting Garbage Collection Performance \u043e\u0442 Oracle<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/cd\/E13150_01\/jrockit_jvm\/jrockit\/jrdocs\/refman\/optionX.html\" rel=\"nofollow\">\u0421\u043f\u0438\u0441\u043e\u043a<\/a> \u0432\u0441\u0435\u0445 X \u043e\u043f\u0446\u0438\u0439 CLI<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">14. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0410\u0442\u043e\u043c\u0438\u043a\u0438?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0410\u0442\u043e\u043c\u0430\u0440\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<br \/>  \u0410\u0442\u043e\u043c\u0438\u043a\u0438 \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e, \u0442.\u043e. \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 lock-free thread-safe \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Compare-and-swap\" rel=\"nofollow\">compare-and-swap (CAS)<\/a> \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\u043c\u0438. \u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 CAS.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0410\u0442\u043e\u043c\u0438\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0410\u0442\u043e\u043c\u0438\u043a \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 <code>volatile<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>value<\/code>, \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>compareAndSet(current, new)<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 <code>current<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CAS \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>value<\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0440\u0430\u0432\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e (\u0442.\u0435. <code>current<\/code>), \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c <code>compareAndSet(current, new)<\/code>. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>value<\/code> \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u0435\u0442\u043e\u0434 <code>compareAndSet<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>false<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430 <code>compareAndSet(current, new)<\/code> \u043f\u043e\u043a\u0430 <code>current<\/code> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <code>value<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0410\u0442\u043e\u043c\u0438\u043a\u043e\u0432 \u043d\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>compare-and-set<\/code> \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 <code>current<\/code> \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0434\u043d\u0443 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0435\u0440\u0435\u0437 CAS<\/li>\n<li><code>set-and-get<\/code> \u2014 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u044e\u0442 <code>current<\/code> \u0438 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CAS \u0432 \u0446\u0438\u043a\u043b\u0435, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>value<\/code> \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/invoke\/VarHandle.html\" rel=\"nofollow\">VarHandle<\/a>, \u043b\u0438\u0431\u043e <a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/java.base\/share\/classes\/jdk\/internal\/misc\/Unsafe.java\" rel=\"nofollow\">Unsafe<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0435\u0433\u043e \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. VarHandle \u2014 \u044d\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u043b\u0438 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0435 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f, \u043d\u0435\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u043a\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435\/\u0437\u0430\u043f\u0438\u0441\u044c, <code>volotile<\/code> \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435\/\u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 <code>compare-and-swap<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/package-summary.html\" rel=\"nofollow\">java.util.concurrent.atomic<\/a> \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0430\u0442\u043e\u043c\u0438\u043a\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicBoolean.html\" rel=\"nofollow\">AtomicBoolean<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicInteger.html\" rel=\"nofollow\">AtomicInteger<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicLong.html\" rel=\"nofollow\">AtomicLong<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicIntegerArray.html\" rel=\"nofollow\">AtomicIntegerArray<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicLongArray.html\" rel=\"nofollow\">AtomicLongArray<\/a> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435, \u0431\u0443\u043b\u0435\u0432\u044b \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0432\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicReference.html\" rel=\"nofollow\">AtomicReference<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicMarkableReference.html\" rel=\"nofollow\">AtomicMarkableReference<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u0430\u0440\u043e\u0439 <code>[reference, boolean]<\/code>.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicStampedReference.html\" rel=\"nofollow\">AtomicStampedReference<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u0430\u0440\u043e\u0439 <code>[reference, int]<\/code>.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicReferenceArray.html\" rel=\"nofollow\">AtomicReferenceArray<\/a> \u2014 \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicIntegerFieldUpdater.html\" rel=\"nofollow\">AtomicIntegerFieldUpdater<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicLongFieldUpdater.html\" rel=\"nofollow\">AtomicLongFieldUpdater<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/AtomicReferenceFieldUpdater.html\" rel=\"nofollow\">AtomicReferenceFieldUpdater<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043f\u043e \u0438\u0445 \u0438\u043c\u0435\u043d\u0430\u043c \u0447\u0435\u0440\u0435\u0437 reflection.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/DoubleAccumulator.html\" rel=\"nofollow\">DoubleAccumulator<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/LongAccumulator.html\" rel=\"nofollow\">LongAccumulator<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0447\u0438\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440 (<code>BinaryOperator<\/code>) \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0435\u0441\u044c \u043d\u0430\u0431\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0442\u043e \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0447\u0442\u0435\u043d\u0438\u044f.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/DoubleAdder.html\" rel=\"nofollow\">DoubleAdder<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/concurrent\/atomic\/LongAdder.html\" rel=\"nofollow\">LongAdder<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438. \u042f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f 0.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0442\u043e\u043c\u0438\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class NonReentrantSpinLock {      private AtomicReference&lt;Thread&gt; owner = new AtomicReference&lt;&gt;();      public void lock() {       Thread currentThread = Thread.currentThread();        while (!owner.compareAndSet(null, currentThread)) {}     }      public void unlock() {       Thread currentThread = Thread.currentThread();       owner.compareAndSet(currentThread, null);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kak-ustroeny-atomiki\/\" rel=\"nofollow\">\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0430\u0442\u043e\u043c\u0438\u043a\u0438?<\/a><\/li>\n<li><a href=\"http:\/\/tutorials.jenkov.com\/java-concurrency\/compare-and-swap.html\" rel=\"nofollow\">Compare and Swap<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/luxoft\/blog\/157273\/\">\u041e\u0431\u0437\u043e\u0440 java.util.concurrent.*<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/353414\/\">\u0420\u0430\u0437\u0431\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0430<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/489038\/\">\u041a\u043d\u0438\u0433\u0430 &quot;Java Concurrency \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435&quot;<\/a> \u2014 \u0435\u0451 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/187854\/\">JDK concurrent package<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/157163\/\">Atomic operations<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/216049\/\">Concurrency: 6 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0436\u0438\u0442\u044c \u0441 shared state<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.amazon.com\/dp\/0123705916\" rel=\"nofollow\">The Art of Multiprocessor Programming<\/a><\/li>\n<li><a href=\"http:\/\/gee.cs.oswego.edu\/dl\/jmm\/cookbook.html\" rel=\"nofollow\">The JSR-133 Cookbook for Compiler Writers<\/a><\/li>\n<li><a href=\"https:\/\/dzone.com\/articles\/atomicreference-a-sometimes-easier-alternative-to\" rel=\"nofollow\">AtomicReference: A (Sometimes Easier) Alternative to Synchronized Blocks<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-atomic-variables\" rel=\"nofollow\">An Introduction to Atomic Variables in Java<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.ibm.com\/developerworks\/ru\/library\/j-jtp11234\/index.html\" rel=\"nofollow\">\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u0438<\/a><\/li>\n<li><a href=\"http:\/\/www.java2s.com\/example\/java\/thread\/use-atomicreference-to-implement-reentrant-lock.html\" rel=\"nofollow\">Use AtomicReference to implement Reentrant Lock<\/a><\/li>\n<li><a href=\"https:\/\/programmer.ink\/think\/a-comprehensive-understanding-of-java-atomic-variable-classes.html\" rel=\"nofollow\">A comprehensive understanding of Java atomic variable classes<\/a><\/li>\n<li><a href=\"https:\/\/shipilev.net\/blog\/2015\/faster-atomic-fu\/\" rel=\"nofollow\">Faster Atomic*FieldUpdaters for Everyone<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=ESs0bZw8hsA\" rel=\"nofollow\">\u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0428\u0438\u043f\u0438\u043b\u0451\u0432 \u2014 \u0415\u0441\u043b\u0438 \u043d\u0435 Unsafe, \u0442\u043e \u043a\u0442\u043e: \u0432\u043e\u0441\u0445\u043e\u0434 VarHandles<\/a><\/li>\n<li><a href=\"https:\/\/www.ibm.com\/developerworks\/java\/library\/j-jtp04186\/index.html\" rel=\"nofollow\">Introduction to nonblocking algorithms<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">15. \u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 TreeSet\/TreeMap? \u0412 \u0447\u0435\u043c \u0438\u0434\u0435\u044f \u041a\u0440\u0430\u0441\u043d\u043e-\u0447\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/TreeMap.html\" rel=\"nofollow\">TreeMap<\/a> \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/NavigableMap.html\" rel=\"nofollow\">NavigableMap<\/a>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Red%E2%80%93black_tree\" rel=\"nofollow\">\u043a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435<\/a>. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u043a\u043b\u044e\u0447\u0430\u043c \u0432 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/Comparable.html\" rel=\"nofollow\">\u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/a> \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/Comparator.html\" rel=\"nofollow\">Comparator<\/a>, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0430\u043f\u044b, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430. \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>containsKey<\/code>, <code>get<\/code>, <code>put<\/code> \u0438 <code>remove<\/code>.<br \/>  <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/TreeSet.html\" rel=\"nofollow\">TreeSet<\/a> \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/NavigableSet.html\" rel=\"nofollow\">NavigableSet<\/a>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 <code>TreeMap<\/code>. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/Comparable.html\" rel=\"nofollow\">\u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/a> \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/Comparator.html\" rel=\"nofollow\">Comparator<\/a>, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430. \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>add<\/code>, <code>contains<\/code> \u0438 <code>remove<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u041d\u0415 <code>synchronized<\/code> \u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u043d\u0438\u043c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/util\/ConcurrentModificationException.html\" rel=\"nofollow\">ConcurrentModificationException<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u044d\u0442\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c <code>null<\/code>, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c <code>NullPointerException<\/code>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 <code>null<\/code> \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0430. \u0414\u043e 7-\u0439 Java \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <code>null<\/code> \u0432 <code>TreeMap<\/code> \u0438 <code>TreeSet<\/code> \u0431\u044b\u043b <a href=\"https:\/\/habr.com\/ru\/post\/164027\/\">\u0431\u0430\u0433<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u043e \u0443\u043c\u0435\u0435\u0442 \u0441\u0430\u043c\u043e \u0441\u0435\u0431\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u0432 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f. \u0421\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u043e\u0439 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0435\u0440\u0448\u0438\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0439, \u043b\u0438\u0431\u043e \u0447\u0451\u0440\u043d\u043e\u0439 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0443\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432<\/li>\n<li>\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/li>\n<li>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0451\u0440\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043e\u0442 \u043a\u043e\u0440\u043d\u044f \u0434\u043e \u043b\u0438\u0441\u0442\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430<\/li>\n<li>\u041a\u043e\u0440\u0435\u043d\u044c \u0434\u0435\u0440\u0435\u0432\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0451\u0440\u043d\u044b\u043c<\/li>\n<li>\u0412\u0441\u0435 \u043b\u0438\u0441\u0442\u044c\u044f \u2014 \u0447\u0451\u0440\u043d\u044b\u0435 \u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/66926\/\">\u0421\u0442\u0430\u0442\u044c\u044f<\/a> \u043f\u0440\u043e \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/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> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-treemap-vs-hashmap\" rel=\"nofollow\">Java TreeMap vs HashMap<\/a><\/li>\n<li><a href=\"https:\/\/javahungry.blogspot.com\/2014\/06\/how-treemap-works-ten-treemap-java-interview-questions.html\" rel=\"nofollow\">10 TreeMap Java Interview Questions<\/a> \u0438 <a href=\"https:\/\/javahungry.blogspot.com\/2015\/10\/how-treeset-works-internally-in-java-interview-questions.html\" rel=\"nofollow\">TreeSet Interview Questions<\/a><\/li>\n<li><a href=\"https:\/\/www.dineshonjava.com\/internal-working-of-treemap-in-java\/\" rel=\"nofollow\">Internal Working of TreeMap in Java<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-treemap\" rel=\"nofollow\">A Guide to TreeMap in Java<\/a> \u0438 <a href=\"https:\/\/www.baeldung.com\/java-tree-set\" rel=\"nofollow\">A Guide to TreeSet in Java<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/330644\/\">\u041a\u0440\u0430\u0441\u043d\u043e-\u0447\u0435\u0440\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f: \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0438 \u044f\u0441\u043d\u043e<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/472040\/\">\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u044b\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u2014 \u0422\u0440\u0438 \u0441\u043b\u0443\u0447\u0430\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/neerc.ifmo.ru\/wiki\/index.php?title=%D0%9A%D1%80%D0%B0%D1%81%D0%BD%D0%BE-%D1%87%D0%B5%D1%80%D0%BD%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE\" rel=\"nofollow\">\u041a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e<\/a><\/li>\n<li><a href=\"https:\/\/www.cs.usfca.edu\/~galles\/visualization\/RedBlack.html\" rel=\"nofollow\">\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a> \u043a\u0440\u0430\u0441\u043d\u043e-\u0447\u0451\u0440\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430. \u0418 <a href=\"http:\/\/www.cs.armstrong.edu\/liang\/animation\/web\/RBTree.html\" rel=\"nofollow\">\u0435\u0449\u0451<\/a>. \u0410 \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/nadakamel\/RedBlackTree-Visualization\" rel=\"nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">16. \u0427\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0441 Java 8 \u043f\u043e Java &lt;CURRENT_VERSION&gt;?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>Java \u0438\u043c\u0435\u0435\u0442 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Java_version_history\" rel=\"nofollow\">\u0431\u043e\u0433\u0430\u0442\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e<\/a>. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>legacy-\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Java \u043c\u0435\u043d\u044c\u0448\u0435 8<\/li>\n<li>\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 Java 8, \u0441\u0430\u043c\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0430\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f<\/li>\n<li>\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 Java 9+ (\u0442\u043e\u0447\u043d\u0435\u0435 \u043b\u0438\u0431\u043e 11 LTS, \u043b\u0438\u0431\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u043e\u0432\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b)<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 8 \u0438 9 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043b\u043e\u043c \u0441 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0439 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c <a href=\"https:\/\/www.oracle.com\/technetwork\/java\/javase\/overview\/oracle-jdk-faqs.html\" rel=\"nofollow\">\u043f\u0440\u0438\u043a\u043e\u043b\u044b \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u043f\u043e\u0434\u044a\u0435\u0445\u0430\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0438 \u0432 \u0431\u0435\u0437 \u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u0435\u0440\u0432\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u043c\u0438\u0440\u0435 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u0434\u0451\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0434\u0451\u0442, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u0443\u0435\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e, \u0433\u0434\u0435 \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0443\u0436\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u043b\u0438, \u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0443 \u0432\u0430\u0441 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043c \u0441 Java 8 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, \u0447\u0435\u043c \u0436\u0438\u0432\u0451\u0442 \u0438 \u0434\u044b\u0448\u0438\u0442 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f Java.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0445\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u043c\u0435\u0435\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/9all-relnotes.html\" rel=\"nofollow\">9<\/a>: <a href=\"http:\/\/openjdk.java.net\/projects\/jigsaw\/\" rel=\"nofollow\">Project Jigsaw aka \u041c\u043e\u0434\u0443\u043b\u0438<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/110\" rel=\"nofollow\">HTTP\/2 Client (Incubator)<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/222\" rel=\"nofollow\">jshell<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/248\" rel=\"nofollow\">G1 GC \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/254\" rel=\"nofollow\">Compact Strings<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk9\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a>.<\/li>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/10-relnote-issues.html\" rel=\"nofollow\">10<\/a>: <a href=\"http:\/\/openjdk.java.net\/jeps\/286\" rel=\"nofollow\">Local-Variable Type Inference (var)<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/307\" rel=\"nofollow\">Parallel Full GC \u0434\u043b\u044f G1<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/317\" rel=\"nofollow\">Graal \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/10\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a>.<\/li>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/jdk-11-relnote.html\" rel=\"nofollow\">11 LTS<\/a>: <a href=\"http:\/\/openjdk.java.net\/jeps\/323\" rel=\"nofollow\">var \u0432 \u043b\u044f\u043c\u0431\u0434\u0430\u0445<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/424683\/\">\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a single-file \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0447\u0435\u0440\u0435\u0437 java<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/424539\/\">\u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f String<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/318\" rel=\"nofollow\">Epsilon GC (Experimental)<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/333\" rel=\"nofollow\">ZGC (Experimental)<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/11\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a>.<\/li>\n<li><a href=\"https:\/\/www.oracle.com\/technetwork\/java\/javase\/12-relnote-issues-5211422.html\" rel=\"nofollow\">12<\/a>: <a href=\"https:\/\/openjdk.java.net\/jeps\/325\" rel=\"nofollow\">Switch Expressions (Preview)<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/189\" rel=\"nofollow\">Shenandoah (Experimental)<\/a>, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0432 G1, <a href=\"https:\/\/openjdk.java.net\/jeps\/230\" rel=\"nofollow\">JMH<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/12\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a><\/li>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/13-relnote-issues.html\" rel=\"nofollow\">13<\/a>: <a href=\"https:\/\/openjdk.java.net\/jeps\/355\" rel=\"nofollow\">Text Blocks (Preview)<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/13\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u043e\u0435<\/a><\/li>\n<li><a href=\"https:\/\/www.oracle.com\/technetwork\/java\/javase\/14-relnote-issues-5809570.html\" rel=\"nofollow\">14<\/a>: <a href=\"https:\/\/openjdk.java.net\/jeps\/305\" rel=\"nofollow\">Pattern Matching \u0434\u043b\u044f instanceof (Preview)<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/343\" rel=\"nofollow\">Packaging Tool (Incubator)<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/358\" rel=\"nofollow\">\u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f NullPointerExceptions<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/359\" rel=\"nofollow\">Records (Preview)<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/14\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a>.<\/li>\n<li><a href=\"http:\/\/jdk.java.net\/15\/release-notes\" rel=\"nofollow\">15<\/a>: <a href=\"https:\/\/openjdk.java.net\/jeps\/360\" rel=\"nofollow\">Sealed Classes (Preview)<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/371\" rel=\"nofollow\">Hidden Classes<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/372\" rel=\"nofollow\">\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 Nashorn JavaScript Engine \u0438\u0437 JDK<\/a> \u0438 <a href=\"https:\/\/openjdk.java.net\/projects\/jdk\/15\/\" rel=\"nofollow\">\u0434\u0440\u0443\u0433\u0438\u0435<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u0439\u0442\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043a API, \u044f\u0437\u044b\u043a\u0443 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, release notes \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c API \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/javaalmanac.io\/\" rel=\"nofollow\">Java-\u0430\u043b\u044c\u043c\u0430\u043d\u0430\u0445\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f Java:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/openjdk.java.net\/projects\/amber\/\" rel=\"nofollow\">Amber<\/a> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445, \u043d\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u044f\u0437\u044b\u043a\u0430 Java. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0446\u0435\u043b\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 JEP: <a href=\"https:\/\/openjdk.java.net\/jeps\/286\" rel=\"nofollow\">var<\/a> (JDK 10), <a href=\"https:\/\/openjdk.java.net\/jeps\/361\" rel=\"nofollow\">Switch Expressions<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/360\" rel=\"nofollow\">Sealed Types<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/359\" rel=\"nofollow\">Records<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/368\" rel=\"nofollow\">Text Blocks<\/a>, <a href=\"https:\/\/openjdk.java.net\/jeps\/375\" rel=\"nofollow\">Pattern Matching \u0434\u043b\u044f instanceof<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435.<\/li>\n<li><a href=\"https:\/\/openjdk.java.net\/projects\/panama\/\" rel=\"nofollow\">Panama<\/a> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 JVM \u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/company\/leader-id\/blog\/505072\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0441 \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 <a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/310014\/\">\u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e<\/a> \u0441 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u043e\u043c \u0418\u0432\u0430\u043d\u043e\u0432\u044b\u043c \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443.<\/li>\n<li><a href=\"https:\/\/wiki.openjdk.java.net\/display\/loom\/Main\" rel=\"nofollow\">Loom<\/a> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0432 Java \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438: <a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/422519\/\">\u0440\u0430\u0437<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/503412\/\">\u0434\u0432\u0430<\/a>.<\/li>\n<li><a href=\"https:\/\/wiki.openjdk.java.net\/display\/valhalla\/Main\" rel=\"nofollow\">Valhalla<\/a> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u044f\u0437\u044b\u043a\u0430 \u0438 VM. \u0412 \u043d\u0435\u0433\u043e \u0432\u0445\u043e\u0434\u044f\u0442: <a href=\"http:\/\/openjdk.java.net\/jeps\/169\" rel=\"nofollow\">Inline types<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/218\" rel=\"nofollow\">Generics over Primitive Types<\/a>, <a href=\"http:\/\/openjdk.java.net\/jeps\/193\" rel=\"nofollow\">Enhanced volatiles<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f.<\/li>\n<li><a href=\"https:\/\/wiki.openjdk.java.net\/display\/lanai\/Main\" rel=\"nofollow\">Lanai<\/a> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0445 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 MacOS \u043f\u0443\u0442\u0451\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/developer.apple.com\/metal\/\" rel=\"nofollow\">Metal<\/a> Apple platform API. C 14 \u043c\u0430\u044f 2020 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c <a href=\"https:\/\/jdk.java.net\/lanai\/\" rel=\"nofollow\">Early-Access \u0441\u0431\u043e\u0440\u043a\u0438<\/a>.<\/li>\n<li>\u0438 \u0434\u0440\u0443\u0433\u0438\u0435<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c <a href=\"https:\/\/www.graalvm.org\/\" rel=\"nofollow\">GraalVM<\/a> \u2014 \u044d\u0442\u043e JDK \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 Java, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u0447\u0442\u043e\u0431\u044b <a href=\"https:\/\/habr.com\/ru\/company\/haulmont\/blog\/433432\/\">\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u043e\u0435<\/a>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Java<\/li>\n<li>\u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f Java<\/li>\n<li>\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u042f\u041f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445<\/li>\n<li>\u043e\u0431\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u042f\u041f<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 JIT \u0438 AOT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/li>\n<li>\u0438 \u0442.\u043f.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043d\u0430 \u0442\u0435\u043c\u0443:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u0432\u0430 \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0434\u043a\u0430\u0441\u0442\u0430 Javaswag: <a href=\"https:\/\/soundcloud.com\/javaswag\/8-evgeniy-kozlov-pochemu-ne-c-var-zlo-ili-net-novye-fichi-java-9-12\" rel=\"nofollow\">\u0440\u0430\u0437<\/a> \u0438 <a href=\"https:\/\/soundcloud.com\/javaswag\/9-evgeniy-kozlov-den-rozhdeniya-java-i-novye-fichi-java-12-14\" rel=\"nofollow\">\u0434\u0432\u0430<\/a><\/li>\n<li><a href=\"https:\/\/podlodka.io\/172\" rel=\"nofollow\">\u0412\u044b\u043f\u0443\u0441\u043a 172 Java<\/a> \u043f\u043e\u0434\u043a\u0430\u0441\u0442\u0430 \u041f\u043e\u0434\u043b\u043e\u0434\u043a\u0430, \u0432 \u0433\u043e\u0441\u0442\u0438 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u0451\u043b \u0422\u0430\u0433\u0438\u0440 \u0412\u0430\u043b\u0435\u0435\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/500468\/\">\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c Java \u0432\u0435\u0440\u0441\u0438\u0439 8-14<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/485750\/\">API, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0441 Java 8. \u0427\u0430\u0441\u0442\u044c 1<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/341058\/\">JAVA 9. \u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/342170\/\">\u041e\u0431\u0437\u043e\u0440 Java 9<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/499872\/\">\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 Java 9<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/426621\/\">\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 Java 9<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/351694\/\">Java 10 General Availability<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/349868\/\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Java 10<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/354114\/\">\u0417\u0430\u043f\u0438\u0441\u043a\u0438 \u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 Java 10<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/456010\/\">\u041a\u0430\u043a Java 10 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/it-grad\/blog\/358810\/\">&quot;\u0416\u0438\u0437\u043d\u044c \u043f\u043e\u0441\u043b\u0435 Java 10&quot;: \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 Java 11<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/424683\/\">90 \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447 (\u0438 API) \u0432 JDK 11<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/424539\/\">Java 11: \u043d\u043e\u0432\u043e\u0435 \u0432 String<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/424543\/\">Java 11 \/ JDK 11: General Availability<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/446590\/\">39 \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Java 12<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/444434\/\">\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f Java 12! \u041e\u0431\u0437\u043e\u0440 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 JEP-\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/445622\/\">\u041d\u043e\u0432\u043e\u0435 \u0432 Java 12: The Teeing Collector<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/467789\/\">\u0422\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u044b\u0448\u043b\u0430 Java 13<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/454144\/\">\u0412 Java 13 \u0445\u043e\u0442\u044f\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c &quot;\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438&quot;<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/483186\/\">Introducing Java 13: Let&#8217;s dive Into JDK&#8217;s New Features<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/alconost\/news\/t\/491378\/\">\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 Java 14<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/491546\/\">Java 14 is coming<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/491564\/\">Java 14: Record, \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 instanceof, \u0443\u043f\u0430\u043a\u043e\u0432\u0449\u0438\u043a jpackage, switch-\u043b\u044f\u043c\u0431\u0434\u044b \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/482300\/\">\u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 Java 14<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/477654\/\">\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 instanceof \u0432 Java 14<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/505696\/\">\u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c sealed \u043a\u043b\u0430\u0441\u0441\u044b \u0432 Java 15<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/430014\/\">Sealed classes. Semantics vs performance<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/490298\/\">Sealed \u0442\u0438\u043f\u044b \u0432 Java<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/518794\/\">\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432 Java 15?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/519270\/\">\u0412\u044b\u0448\u043b\u0430 Java 15<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/leader-id\/blog\/505072\/\">Project Panama: \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c Java &quot;\u0431\u043b\u0438\u0436\u0435 \u043a \u0436\u0435\u043b\u0435\u0437\u0443&quot;?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/422519\/\">\u0420\u0430\u0437\u0434\u0430\u0447\u0430 \u0445\u0430\u043b\u044f\u0432\u044b: \u043d\u0435\u0442\u043e\u0440\u043c\u043e\u0437\u044f\u0449\u0438\u0435 \u0442\u0440\u0435\u0434\u044b \u0432 Java. Project Loom<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/503412\/\">Project Loom: \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0432 Java \u0443\u0436\u0435 \u0431\u043b\u0438\u0437\u043a\u043e<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/haulmont\/blog\/433432\/\">\u0414\u0435\u0441\u044f\u0442\u044c \u0432\u0435\u0449\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 GraalVM<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/419637\/\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Graal \u2014 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 JVM \u043d\u0430 Java<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/billing\/blog\/351682\/\">Graal: \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 JVM \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/451574\/\">\u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u043d\u0430 GraalVM<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/445978\/\">\u0421\u043a\u0440\u0435\u0449\u0438\u0432\u0430\u0435\u043c \u0443\u0436\u0430 \u0441 \u0435\u0436\u043e\u043c: OpenJDK-11 + GraalVM<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/353624\/\">JavaScript, Java, \u043a\u0430\u043a\u0430\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/485024\/\">\u0427\u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 GraalVM?<\/a><br \/>  \u0418 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e:<\/li>\n<li><a href=\"https:\/\/javaalmanac.io\/\" rel=\"nofollow\">Java-\u0430\u043b\u044c\u043c\u0430\u043d\u0430\u0445<\/a><\/li>\n<li>State of Loom: <a href=\"http:\/\/cr.openjdk.java.net\/~rpressler\/loom\/loom\/sol1_part1.html\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 1<\/a> \u0438 <a href=\"http:\/\/cr.openjdk.java.net\/~rpressler\/loom\/loom\/sol1_part2.html\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 2<\/a><\/li>\n<li><a href=\"https:\/\/www.graalvm.org\/\" rel=\"nofollow\">GraalVM<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=Gvs-nGUiqFA\" rel=\"nofollow\">Cay Horstmann \u2014 Feature evolution in Java 13 and beyond<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=5Y0Alqb9H_I\" rel=\"nofollow\">\u0422\u0430\u0433\u0438\u0440 \u0412\u0430\u043b\u0435\u0435\u0432 \u2014 Java 9-14: \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=hEnvRXNyDgI\" rel=\"nofollow\">\u041d\u0438\u043a\u0438\u0442\u0430 \u041b\u0438\u043f\u0441\u043a\u0438\u0439 \u2014 Java 9 \u041c\u043e\u0434\u0443\u043b\u0438. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 OSGi?<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=_cvgg9szPH8\" rel=\"nofollow\">Cay Horstmann \u2014 Java 9: the good parts (not modules)<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=4vHMmLqF09Y\" rel=\"nofollow\">\u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440 \u0418\u0432\u0430\u043d\u043e\u0432 \u2014 Project Panama: \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c Java \u201c\u0431\u043b\u0438\u0436\u0435 \u043a \u0436\u0435\u043b\u0435\u0437\u0443\u201d?<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=lH4H0LEAo9g\" rel=\"nofollow\">\u041e\u043b\u0435\u0433 \u0427\u0438\u0440\u0443\u0445\u0438\u043d \u2014 GraalVM \u0412\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0438\u0439<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=hnadkXBIC1k\" rel=\"nofollow\">\u041e\u043b\u0435\u0433 \u0427\u0438\u0440\u0443\u0445\u0438\u043d \u2014 Graal, Value Types, Loom \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043d\u0438\u0448\u0442\u044f\u043a\u0438<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=tPezgDSD1Bk\" rel=\"nofollow\">\u041e\u043b\u0435\u0433 \u0428\u0435\u043b\u0430\u0435\u0432 \u2014 \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c Java ahead of time \u0441 GraalVM<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=C5fATKdVxZ0\" rel=\"nofollow\">\u041e\u043b\u0435\u0433 \u0428\u0435\u043b\u0430\u0435\u0432 \u2014 \u0421\u0443\u043f\u0435\u0440\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f, partial evaluation, \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0424\u0443\u0442\u0430\u043c\u0443\u0440\u044b \u0438 \u043a\u0430\u043a GraalVM \u0441\u043f\u0430\u0441\u0435\u0442 \u043c\u0438\u0440<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=wWAxD7STTFQ\" rel=\"nofollow\">Project Loom<\/a> \u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=qN8x-aIrhxk\" rel=\"nofollow\">\u041d\u043e\u0432\u043e\u0435 \u0432 JDK 14<\/a> \u043d\u0430 letsCode<\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=eBuFzQeiGe0\" rel=\"nofollow\">GOTO 2019 \u2022 Life After Java 8 \u2022 Trisha Gee<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=NeYYmIup5nY\" rel=\"nofollow\">Dalia Abo Sheasha \u2014 Migrating beyond Java 8<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=lIq-x_iI-kc\" rel=\"nofollow\">Project Loom: Helping Write Concurrent Applications on the Java Platform by Ron Pressler<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">17. \u0412 \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 Java? \u041a\u0430\u043a \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 String? \u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d String?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u043e Java 9 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043c\u0435\u043b\u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 <code>UTF-16<\/code> (2 \u0431\u0430\u0439\u0442\u0430 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b) \u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <code>char<\/code>.<br \/>  \u0421 Java 9 \u043f\u0440\u0438\u0448\u043b\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/openjdk.java.net\/jeps\/254\" rel=\"nofollow\">Compact String<\/a>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 <code>Latin-1<\/code> (\u0430 \u044d\u0442\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a), \u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0432 1 \u0431\u0430\u0439\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 <code>char<\/code> \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 <code>char<\/code> \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 <code>byte<\/code>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0430\u043c <code>Latin-1<\/code> \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u043b\u0435 <code>byte coder<\/code>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <code>Latin-1<\/code> \u0438\u043b\u0438 <code>UTF-16<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>String<\/code> \u0441\u0432\u043e\u0435\u0433\u043e <code>hashcode<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438, \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0442\u0440\u043e\u043a \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e (<code>final class<\/code>). \u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0435\u0451 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <a href=\"https:\/\/docs.oracle.com\/javase\/specs\/jls\/se8\/html\/jls-15.html#jls-15.18.1\" rel=\"nofollow\">\u0443\u043c\u0435\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044e<\/a> \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0435\u0451 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/StringBuilder.html\" rel=\"nofollow\">StringBuilder<\/a> \u0438 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>append<\/code>. \u041e\u0414\u041d\u0410\u041a\u041e! \u0412 Java 9 \u0432\u043e\u0448\u0451\u043b <a href=\"https:\/\/openjdk.java.net\/jeps\/280\" rel=\"nofollow\">JEP 280: Indify String Concatenation<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u044d\u0442\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0448\u0451\u043b \u0435\u0449\u0451 \u0434\u0430\u043b\u044c\u0448\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043c\u0435\u0441\u0442\u043e <code>StringBuilder<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f bytecode \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/11\/docs\/api\/java.base\/java\/lang\/invoke\/StringConcatFactory.html\" rel=\"nofollow\">StringConcatFactory<\/a> \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.infoq.com\/articles\/Invokedynamic-Javas-secret-weapon\/\" rel=\"nofollow\">invokedynamic<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u0438\u0442\u044c\u0441\u044f \u0438 \u0447\u0430\u0449\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c <code>+<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e <code>String pool<\/code> \u2014 \u044d\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0435 \u0432 <code>heap<\/code> \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u043a. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u043c\u0443 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e [String.intern()](<a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/String.html#intern\" rel=\"nofollow\">https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/String.html#intern<\/a>()) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0441\u043e\u0431\u043e\u0439 \u043d\u0435 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0451 \u043f\u043e \u043c\u0438\u0440\u0443. \u041b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041f\u043e\u0434\u043e\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 \u2014 <a href=\"https:\/\/shipilev.net\/jvm\/anatomy-quarks\/10-string-intern\/\" rel=\"nofollow\">JVM Anatomy Quark #10: String.intern()<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/String.html#equals(java.lang.Object)\" rel=\"nofollow\">equals<\/a> \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0438\u0441\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/String.html#indexOf(int)\" rel=\"nofollow\">indexOf<\/a>) <a href=\"https:\/\/habr.com\/ru\/post\/352086\/\">\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f JIT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c<\/a> \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u0410\u043b\u0435\u043a\u0441\u0435\u044f \u0428\u0438\u043f\u0438\u043b\u0451\u0432\u0430 \u043d\u0430 \u0442\u0435\u043c\u0443 \u0441\u0442\u0440\u043e\u043a: <a href=\"https:\/\/www.youtube.com\/watch?v=SZFe3m1DV1A\" rel=\"nofollow\">\u041a\u0430\u0442\u0435\u0445\u0438\u0437\u0438\u0441 java.lang.String<\/a> \u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=HWkVJkoo1_Q\" rel=\"nofollow\">The Lord of the Strings: Two Scours<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/String.html\" rel=\"nofollow\">String javadoc<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kak-oboiti-strochku\/\" rel=\"nofollow\">\u041a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443?<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/iz-chego-sostoit-string\/\" rel=\"nofollow\">\u0418\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 String?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/444822\/\">JDK 9\/JEP 280: \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0436\u043d\u0435\u0439<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/426621\/\">\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 Java 9<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-string-pool\" rel=\"nofollow\">Guide to Java String Pool<\/a> \u043d\u0430 Baeldung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-9-compact-string\" rel=\"nofollow\">Compact Strings in Java 9<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=DgshYDTpS9I\" rel=\"nofollow\">\u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440 \u0418\u0432\u0430\u043d\u043e\u0432 \u2014 \u0413\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 invokedynamic<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=0vfFHMGESVQ\" rel=\"nofollow\">Charles Nutter \u2014 Let&#8217;s Talk About Invokedynamic<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/328240\/\">\u0427\u0442\u043e \u0442\u0430\u043c \u0441 JEP-303 \u0438\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u043c invokedynamic<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">18. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 ThreadLocal \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/ThreadLocal.html\" rel=\"nofollow\">ThreadLocal<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0451 \u043f\u043e\u0442\u043e\u043a\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 <code>ThreadLocal<\/code>-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0435 \u0432 \u043d\u0438\u0445 \u0441\u0430\u043c\u0438\u0445, \u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 <code>Thread<\/code>. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/14\/docs\/api\/java.base\/java\/lang\/Thread.html\" rel=\"nofollow\">Thread<\/a> \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 <code>ThreadLocal.ThreadLocalMap threadLocals<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>ThreadLocal<\/code>. <code>ThreadLocal.ThreadLocalMap<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <code>HashMap<\/code>, \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043e\u0442 <code>WeakReference&lt;ThreadLocal&lt;?&gt;&gt;<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043b\u044e\u0447 \u043c\u0430\u043f\u044b \u043a\u0430\u043a <code>ref field<\/code> \u0441\u043b\u0430\u0431\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438. \u041a\u043b\u044e\u0447\u0430\u043c\u0438 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u043f\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>ThreadLocal<\/code>, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 <code>Object<\/code>. \u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0430\u0432\u0435\u043d <code>null<\/code>, \u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043d\u043e\u0439 (<code>stale<\/code>) \u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0430 \u0438\u0437 \u043c\u0430\u043f\u044b.<br \/>  \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <code>ThreadLocal<\/code> \u0438\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0430 \u043d\u0435 \u043a\u043e\u043f\u0438\u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432\u0435\u0434\u0443\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438.<br \/>  \u041a\u043e\u0433\u0434\u0430 \u0443 <code>ThreadLocal<\/code>-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 <code>get<\/code>), \u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u0430\u043f\u0443 <code>threadLocals<\/code>, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043c\u0430\u043f\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0435\u0431\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>ThreadLocal<\/code>.<br \/>  \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>ThreadLocal<\/code>-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0442\u043e\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/zachem-ispolzuiutsia-thread-local-peremennye\/\" rel=\"nofollow\">\u0417\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f thread local \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435?<\/a><\/li>\n<li><a href=\"http:\/\/samolisov.blogspot.com\/2011\/04\/threadlocal.html\" rel=\"nofollow\">\u041e \u0431\u0435\u0434\u043d\u043e\u043c ThreadLocal \u0437\u0430\u043c\u043e\u043b\u0432\u0438\u0442\u0435 \u0441\u043b\u043e\u0432\u043e<\/a><\/li>\n<li><a href=\"https:\/\/articles.javatalks.ru\/articles\/17\" rel=\"nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ThreadLocal \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/java-threadlocal\" rel=\"nofollow\">An Introduction to ThreadLocal in Java<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/maxifier\/blog\/218313\/\">\u0423\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 ThreadLocal<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/108016\/\">5 \u0432\u0435\u0449\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u043e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/353414\/\">\u0420\u0430\u0437\u0431\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0430<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">19. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u0431\u0430\u0439\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438? \u0410 \u043e\u0431\u044a\u0435\u043a\u0442?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>byte<\/code> \u2014 1 \u0431\u0430\u0439\u0442<\/li>\n<li><code>short<\/code> \u2014 2 \u0431\u0430\u0439\u0442\u0430<\/li>\n<li><code>int<\/code> \u2014 4 \u0431\u0430\u0439\u0442\u0430<\/li>\n<li><code>long<\/code> \u2014 8 \u0431\u0430\u0439\u0442<\/li>\n<li><code>char<\/code> \u2014 2 \u0431\u0430\u0439\u0442\u0430<\/li>\n<li><code>float<\/code> \u2014 4 \u0431\u0430\u0439\u0442\u0430<\/li>\n<li><code>double<\/code> \u2014 8 \u0431\u0430\u0439\u0442<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0410 \u0440\u0430\u0437\u043c\u0435\u0440 boolean \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u043e\u0432\u0441\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u2014 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u0442\u0430\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JVM. \u041d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0440\u043e\u043b\u044c \u0432 \u044d\u0442\u043e\u043c \u0438\u0433\u0440\u0430\u0435\u0442 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Data_structure_alignment\" rel=\"nofollow\">\u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438 \u0441\u043e \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u2014 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f JVM \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u0435\u0451 \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0428\u0438\u043f\u0438\u043b\u0451\u0432 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/shipilev.net\/jvm\/objects-inside-out\/\" rel=\"nofollow\">Java Objects Inside Out<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/javase\/specs\/jvms\/se15\/html\/jvms-2.html#jvms-2.2\" rel=\"nofollow\">The Java Virtual Machine Specification<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kakie-sushchestvuiut-primitivy\/\" rel=\"nofollow\">\u041a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b?<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/skolko-pamiati-zanimaet-obekt\/\" rel=\"nofollow\">\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442?<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/kakie-sushchestvuiut-primitivy\/\" rel=\"nofollow\">\u041a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/134102\/\">\u0420\u0430\u0437\u043c\u0435\u0440 Java \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/shipilev.net\/jvm\/objects-inside-out\/\" rel=\"nofollow\">Java Objects Inside Out<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jol\" rel=\"nofollow\">jol<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/332708\/\">\u041a\u0430\u043a JVM \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b?<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/440166\/\">\u0421\u0436\u0430\u0442\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 Java<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/jvm-measuring-object-sizes\" rel=\"nofollow\">Measuring Object Sizes in the JVM<\/a> \u043d\u0430 Bealdung<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 jvm \u0438 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f (\u0438 \u0432\u044b \u0443\u043c\u0435\u0435\u0442\u0435-\u043c\u043e\u0433\u0451\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c C++), \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 openjdk. \u041d\u0430\u0447\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u0441\u044e\u0434\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/oops\/instanceOop.hpp\" rel=\"nofollow\">instanceOop.hpp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/oops\/klass.hpp\" rel=\"nofollow\">klass.hpp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/oops\/instanceKlass.hpp\" rel=\"nofollow\">instanceKlass.hpp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/oops\/objArrayKlass.hpp\" rel=\"nofollow\">objArrayKlass.hpp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/oops\/objArrayOop.hpp\" rel=\"nofollow\">objArrayOop.hpp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/openjdk\/jdk\/blob\/master\/src\/hotspot\/share\/memory\/oopFactory.hpp\" rel=\"nofollow\">oopFactory.hpp<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">20. \u041a\u0430\u043a\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0432 Java?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0422\u0438\u043f\u044b \u0441\u0441\u044b\u043b\u043e\u043a \u0432 Java:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>Strong reference<\/code> \u2014 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 Java. \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f GC \u043d\u0435 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c (\u043d\u0438\u043a\u0442\u043e \u043d\u0438\u0433\u0434\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f).<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Weak_reference\" rel=\"nofollow\">\u0421\u043b\u0430\u0431\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/a> \u2014 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0442\u0435\u043c \u0438\u043b\u0438 \u0438\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u043a\u0443\u0447\u0435 \u043f\u0440\u0438 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e. \u041e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0441\u043b\u0430\u0431\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e:<br \/> \n<ul>\n<li><code>Soft reference<\/code> \u2014 \u043c\u044f\u0433\u043a\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430, \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/lang\/ref\/SoftReference.html\" rel=\"nofollow\">SoftReference<\/a>. \u041e\u0431\u044a\u0435\u043a\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d GC \u0434\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/lang\/OutOfMemoryError.html\" rel=\"nofollow\">OutOfMemoryError<\/a>. \u041c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u044d\u0448\u0435\u0439, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0431\u0435\u0437 \u0440\u0438\u0441\u043a\u0430 <code>OutOfMemoryError<\/code> \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li><code>Weak reference<\/code> \u2014 \u0441\u043b\u0430\u0431\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430, \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/lang\/ref\/WeakReference.html\" rel=\"nofollow\">WeakReference<\/a>. \u041d\u0435 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f GC \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u0443\u0441\u043e\u0440\u0430. \u041c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0435\u0433\u043e \u0441\u043c\u0435\u0440\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/util\/WeakHashMap.html\" rel=\"nofollow\">WeakHashMap<\/a>.<\/li>\n<li><code>Phantom reference<\/code> \u2014 \u0444\u0430\u043d\u0442\u043e\u043c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430, \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/lang\/ref\/PhantomReference.html\" rel=\"nofollow\">PhantomReference<\/a>. \u041d\u0435 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f GC \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0442\u0430\u043b \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b (\u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0435\u043c <code>finalize()<\/code>, \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0435\u0430\u043d\u0441\u044b \u0432\u043e\u0441\u043a\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 deprecated).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>get()<\/code>. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c, \u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0432\u0435\u0440\u043d\u0451\u0442 <code>null<\/code>. \u0414\u043b\u044f \u0444\u0430\u043d\u0442\u043e\u043c\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>null<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043b\u0430\u0431\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043c\u043e\u0436\u043d\u043e, \u0430 \u0434\u043b\u044f <code>PhantomReference<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/15\/docs\/api\/java.base\/java\/lang\/ref\/ReferenceQueue.html\" rel=\"nofollow\">ReferenceQueue<\/a> \u2014 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043f\u0440\u043e\u0442\u0443\u0445\u043d\u0435\u0442. \u0414\u043b\u044f <code>SoftReference<\/code> \u0438 <code>WeakReference<\/code> \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0414\u041e \u0444\u0438\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0434\u043b\u044f <code>PhantomReference<\/code> \u041f\u041e\u0421\u041b\u0415. \u041e\u0434\u043d\u0430\u043a\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0444\u0430\u043d\u0442\u043e\u043c\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0435\u0451 \u043e\u0447\u0438\u0441\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/169883\/\">\u041c\u044f\u0433\u043a\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u043a\u0430\u043a \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"http:\/\/samolisov.blogspot.com\/2011\/09\/phantomreferences-java.html\" rel=\"nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PhantomReferences \u0432 Java<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<h3 id=\"spring\">Spring<\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">21. \u041a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c scope \u0432 Spring? \u041a\u0430\u043a\u043e\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e? \u0427\u0435\u043c singleton \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 prototype? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 scope \u0438 \u043a\u0430\u043a? \u041f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0432\u043e\u043f\u0440\u043e\u0441 &#39;\u041a\u0430\u043a \u0437\u0430\u0438\u043d\u0436\u0435\u043a\u0442\u0438\u0442\u044c prototype \u0432 singleton?&#39;<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>Spring scope:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>singleton<\/code> (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)<\/li>\n<li><code>prototype<\/code><\/li>\n<li><code>request<\/code><\/li>\n<li><code>session<\/code><\/li>\n<li><code>application<\/code><\/li>\n<li><code>websocket<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u043e <code>scope<\/code> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/core.html#beans-factory-scopes\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, <a href=\"https:\/\/www.baeldung.com\/spring-bean-scopes\" rel=\"nofollow\">Bealdung<\/a>. \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=cou_qomYLNU&amp;t=2s\" rel=\"nofollow\">Spring-\u043f\u043e\u0442\u0440\u043e\u0448\u0438\u0442\u0435\u043b\u044c \u0427. 2<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e <code>prototype<\/code> \u0432 <code>singleton<\/code> \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>@Lookup<\/code><\/li>\n<li>\u0424\u0430\u0431\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 <code>prototype<\/code>-\u0431\u0438\u043d\u043e\u0432<\/li>\n<li><code>ProxyMod = ScopedProxyMode.TARGET_CLASS<\/code><br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0435\u0441\u0442\u044c \u0432 <a href=\"https:\/\/www.baeldung.com\/spring-inject-prototype-bean-into-singleton\" rel=\"nofollow\">Bealdung<\/a> \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c <a href=\"https:\/\/www.youtube.com\/watch?v=cou_qomYLNU&amp;t=2s\" rel=\"nofollow\">Spring-\u043f\u043e\u0442\u0440\u043e\u0448\u0438\u0442\u0435\u043b\u044c \u0427. 2<\/a>.<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">22. \u0427\u0430\u0441\u0442\u043e \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u043e \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u0431\u0438\u043d\u043e\u0432 \u0432 Spring. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043b\u0438 \u044d\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435? \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u043e \u043a\u0430\u043a \u0435\u0451 \u0440\u0435\u0448\u0438\u0442\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u0430, \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>BeanCurrentlyInCreationException<\/code> (\u043f\u0440\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440).<\/p>\n<p>  <\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0442\u043e\u0439 \u043b\u0438 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u043c\u044b \u0434\u0435\u0440\u0436\u0438\u043c \u043f\u0443\u0442\u044c \u2014 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0437\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0434\u0438\u0437\u0430\u0439\u043d \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/li>\n<li>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0431\u0438\u043d\u043e\u0432 \u043b\u0435\u043d\u0438\u0432\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>@Lazy<\/code><\/li>\n<li>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 setter-\u043c\u0435\u0442\u043e\u0434, \u0430 \u043d\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0432 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/core.html#beans-dependency-resolution\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u0438 \u0432 <a href=\"https:\/\/www.baeldung.com\/circular-dependencies-in-spring\" rel=\"nofollow\">Bealdung<\/a><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">23. \u0411\u044b\u0432\u0430\u044e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0431\u0438\u043d\u0430, \u044d\u0442\u0430\u043f\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u0440\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043f\u0440\u0438\u043d\u0433\u0430 \u0432\u043d\u0443\u0442\u0440\u0438, \u043f\u0440\u043e DI \u0438 \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0422\u0443\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043d\u0430\u0434\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c Spring-\u043f\u043e\u0442\u0440\u043e\u0448\u0438\u0442\u0435\u043b\u044c <a href=\"https:\/\/www.youtube.com\/watch?v=BmBr5diz8WA\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 1<\/a> \u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=cou_qomYLNU&amp;t=2s\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 2<\/a>. \u0422\u0430\u043a\u0436\u0435 \u0431\u043b\u0430\u0433\u043e\u0435 \u0434\u0435\u043b\u043e \u2014 \u044d\u0442\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/core.html#spring-core\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e \u044d\u0442\u0430\u043f\u0430\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0435\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/222579\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">24. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u043f\u0440\u043e @Transactional. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0437\u0430\u0447\u0435\u043c? \u041a\u0430\u043a\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c @Transactional \u043d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434? \u0410 \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441 @Transactional \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 @Transactional \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 &#8212; \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d Proxy \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/refactoring.guru\/ru\/design-patterns\/proxy\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 <code>MyServiceImpl<\/code> \u0438\u043c\u0435\u0435\u0442 2 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <code>@Transactional<\/code> \u2014 <code>method1<\/code> \u0438 <code>method2<\/code>(\u043e\u043d \u0441 <code>Propagation.REQUIRES_NEW<\/code>). \u0412 <code>method1<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>method2<\/code>. <\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Spring AOP, \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 <code>method1()<\/code> \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u043a\u0441\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 <code>method1()<\/code> \u043a\u043b\u0430\u0441\u0441\u0430 <code>MyServiceImpl<\/code>. \u0410 \u043a\u043e\u0433\u0434\u0430 \u0438\u0437 <code>method1()<\/code> \u0432\u044b\u0437\u043e\u0432\u0435\u043c <code>method2()<\/code>, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0435\u0442, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p><\/blockquote>\n<p>\u042d\u0442\u043e \u0446\u0438\u0442\u0430\u0442\u0430 \u0438 \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/post\/347752\/\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c? Spring-\u043f\u043e\u0442\u0440\u043e\u0448\u0438\u0442\u0435\u043b\u044c \u043e\u043f\u044f\u0442\u044c \u0438 \u0441\u043d\u043e\u0432\u0430 \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=BmBr5diz8WA\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 1<\/a> \u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=cou_qomYLNU&amp;t=2s\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 2<\/a>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u044b\u043c \u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u043f\u0435\u0440\u0432\u043e\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/core.html#aop-proxying\" rel=\"nofollow\">Proxy<\/a> \u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/data-access.html\" rel=\"nofollow\">\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438<\/a>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">25. \u0413\u0434\u0435 \u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e (\u041d\u0415 Boot) Spring-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f main-\u043a\u043b\u0430\u0441\u0441?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0421\u0442\u0430\u0440\u043e\u0435 \u0434\u043e\u0431\u0440\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 Spring-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u0441\u044f \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_container\" rel=\"nofollow\">\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u043e\u0432<\/a> (\u0438\u043b\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_application_servers#Java\" rel=\"nofollow\">\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a>), \u0433\u0434\u0435 \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d main-\u043a\u043b\u0430\u0441\u0441. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/WAR_(file_format)\" rel=\"nofollow\">war-\u0430\u0440\u0445\u0438\u0432<\/a>. \u041a\u043e\u0433\u0434\u0430 war-\u0444\u0430\u0439\u043b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. Spring Boot \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a war \u0438 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/spring-projects.ru\/understanding\/war\/\" rel=\"nofollow\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 WAR<\/a><\/li>\n<li><a href=\"https:\/\/itsobes.ru\/JavaSobes\/v-chiom-raznitsa-mezhdu-jar-i-war\/\" rel=\"nofollow\">\u0412 \u0447\u0451\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 jar \u0438 war?<\/a><\/li>\n<li>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f Spring Boot JAR \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 WAR \u043d\u0430 <a href=\"https:\/\/spring-projects.ru\/guides\/convert-jar-to-war-maven\/\" rel=\"nofollow\">RUS<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/spring.io\/guides\/gs\/convert-jar-to-war\/\" rel=\"nofollow\">ENG<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">26. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Spring Boot \u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u044b?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <a href=\"https:\/\/www.baeldung.com\/spring-boot-starter-parent\" rel=\"nofollow\">spring-boot-starter-parent<\/a>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/2.3.1.RELEASE\/maven-plugin\/reference\/html\/#using-import\" rel=\"nofollow\">spring-boot-dependencies<\/a>, \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u043f\u0430\u0440\u0438\u0442\u044c\u0441\u044f \u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u2014 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/html\/appendix-dependency-versions.html\" rel=\"nofollow\">\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e<\/a> \u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043e \u0432 <a href=\"https:\/\/maven.apache.org\/guides\/introduction\/introduction-to-dependency-mechanism.html#dependency-management\" rel=\"nofollow\"><code>dependencyManagement<\/code><\/a> \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e <a href=\"https:\/\/maven.apache.org\/pom.html#Inheritance\" rel=\"nofollow\">pom<\/a>. \u0418\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.baeldung.com\/spring-maven-bom\" rel=\"nofollow\">BOM<\/a>.<\/p>\n<p>  <\/p>\n<p>Spring Boot \u0447\u0435\u0440\u043f\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u043c\u043e\u0449\u044c \u0438\u0437 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#using-boot-starter\" rel=\"nofollow\">\u0441\u0442\u0430\u0440\u0442\u0435\u0440\u043e\u0432<\/a> \u2014 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u043e\u0432 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 properties-\u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f Spring Boot \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f main-\u043a\u043b\u0430\u0441\u0441 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/2.0.x\/reference\/html\/using-boot-using-springbootapplication-annotation.html\" rel=\"nofollow\">@SpringBootApplication<\/a> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/SpringApplication.html#run-java.lang.Class:A-java.lang.String:A-\" rel=\"nofollow\">run<\/a> \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/2.1.10.RELEASE\/reference\/html\/boot-features-spring-application.html\" rel=\"nofollow\">SpringApplication<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <a href=\"http:\/\/spring-projects.ru\/understanding\/application-context\/\" rel=\"nofollow\">ApplicationContext<\/a>.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">@SpringBootApplication public class MyApplication {      public static void main(String[] args) {         SpringApplication.run(MyApplication.class, args);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@SpringBootApplication<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/autoconfigure\/EnableAutoConfiguration.html\" rel=\"nofollow\">@EnableAutoConfiguration<\/a>, <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/context\/annotation\/ComponentScan.html\" rel=\"nofollow\"><code>@ComponentScan<\/code><\/a> \u0438 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/context\/annotation\/Configuration.html\" rel=\"nofollow\">@Configuration<\/a>.<\/p>\n<p>  <\/p>\n<p><code>SpringBootApplication<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043b\u0438\u0431\u043e <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/context\/WebApplicationContext.html\" rel=\"nofollow\">WebApplicationContext<\/a> (\u0435\u0441\u043b\u0438 \u0432 classpath \u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/servlet\/Servlet.html\" rel=\"nofollow\"><code>Servlet<\/code><\/a> \u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/context\/ConfigurableWebApplicationContext.html\" rel=\"nofollow\"><code>ConfigurableWebApplicationContext<\/code><\/a>), \u043b\u0438\u0431\u043e <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/context\/support\/GenericApplicationContext.html\" rel=\"nofollow\"><code>GenericApplicationContext<\/code><\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b <a href=\"https:\/\/docs.spring.io\/autorepo\/docs\/spring-boot\/2.0.0.M3\/reference\/html\/boot-features-developing-auto-configuration.html\" rel=\"nofollow\">META-INF\/spring.factories<\/a> \u2014 \u0432 \u043d\u0451\u043c \u043a\u043b\u044e\u0447\u0443 <code>org.springframework.boot.autoconfigure.EnableAutoConfiguration<\/code> \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043f\u043e\u043b\u043d\u044b\u0445 \u0438\u043c\u0451\u043d \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 (\u0430 \u0432 \u043d\u0438\u0445 \u0431\u0438\u043d\u044b, <code>@ComponentScan<\/code>, <code>@Import<\/code> \u0438 \u0442.\u043f.) \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e.<\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@EnableAutoConfiguration<\/code> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/autoconfigure\/AutoConfigurationImportSelector.html\" rel=\"nofollow\">AutoConfigurationImportSelector<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>getCandidateConfigurations<\/code> \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/core\/io\/support\/SpringFactoriesLoader.html\" rel=\"nofollow\">SpringFactoriesLoader<\/a> \u0438 \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0443 <code>loadFactoryNames<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c classpath \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 <code>META-INF\/spring.factories<\/code> \u0438 \u0438\u043c\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0432 \u043d\u0438\u0445, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 Spring boot \u0435\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>spring-boot-autoconfigure<\/code> \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c <a href=\"https:\/\/github.com\/spring-projects\/spring-boot\/blob\/v2.0.0.M3\/spring-boot-autoconfigure\/src\/main\/resources\/META-INF\/spring.factories\" rel=\"nofollow\">META-INF\/spring.factories<\/a>. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0435-\u0432\u0441\u0435 \u0431\u0438\u043d\u044b \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439, \u0443 \u0431\u0438\u043d\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/context\/annotation\/Conditional.html\" rel=\"nofollow\"><code>@Conditional<\/code><\/a> (\u0438\u043b\u0438 \u0435\u0451 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438) \u0441 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c Spring boot \u0432 jar \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/maven-plugin\/reference\/html\/\" rel=\"nofollow\">spring-boot-maven-plugin<\/a>. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e jar \u0432 <code>META-INF\/MANIFEST.MF<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d <code>Main-Class<\/code> \u2014 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/loader\/JarLauncher.html\" rel=\"nofollow\">org.springframework.boot.loader.JarLauncher<\/a>, \u0430 \u0432 <code>Start-Class<\/code> \u0431\u0443\u0434\u0435\u0442 \u0443\u0436\u0435 main-\u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <code>JarLauncher<\/code> \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 class path (\u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432 \u043d\u0451\u043c \u0442\u043e\u043b\u044c\u043a\u043e <code>org.springframework.boot<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>BOOT-INF<\/code>(\u0442\u0430\u043c <code>lib<\/code> \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 <code>class<\/code> \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 <code>Start-Class<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043e\u043a\u043b\u0430\u0434 \u0415\u0432\u0433\u0435\u043d\u0438\u044f \u0411\u043e\u0440\u0438\u0441\u043e\u0432\u0430 \u0438 \u041a\u0438\u0440\u0438\u043b\u043b\u0430 \u0422\u043e\u043b\u043a\u0430\u0447\u0451\u0432\u0430 Boot yourself, Spring is coming: <a href=\"https:\/\/www.youtube.com\/watch?v=yy43NOreJG4&amp;t=1s\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 1<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=7Cq5zEm2wq0\" rel=\"nofollow\">\u0447\u0430\u0441\u0442\u044c 2<\/a>. \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430: <a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/424503\/\">\u0447\u0430\u0441\u0442\u044c 1<\/a>, <a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/425333\/\">\u0447\u0430\u0441\u0442\u044c 2<\/a>.<\/li>\n<li>\u0414\u043e\u043a\u043b\u0430\u0434 \u041a\u0438\u0440\u0438\u043b\u043b\u0430 \u0422\u043e\u043b\u043a\u0430\u0447\u0451\u0432\u0430 \u0438 \u041c\u0430\u043a\u0441\u0438\u043c\u0430 \u0413\u043e\u0440\u0435\u043b\u0438\u043a\u043e\u0432\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=2_iE7jZWl3U\" rel=\"nofollow\">Spring Boot Starter \u2014 \u043a\u0430\u043a \u0438 \u0437\u0430\u0447\u0435\u043c?<\/a><\/li>\n<li>\u0414\u043e\u043a\u043b\u0430\u0434 \u041a\u0438\u0440\u0438\u043b\u043b\u0430 \u0422\u043e\u043b\u043a\u0430\u0447\u0451\u0432\u0430 \u0438 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430 \u0422\u0430\u0440\u0430\u0441\u043e\u0432\u0430 \u2014 <a href=\"https:\/\/www.youtube.com\/watch?v=5WdzD15xE-4\" rel=\"nofollow\">\u0422\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 Spring Boot Starter<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0430 \u0425\u0430\u0431\u0440\u0435: <a href=\"https:\/\/habr.com\/ru\/post\/487980\/\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Spring Boot Auto-Configuration<\/a>, <a href=\"https:\/\/habr.com\/ru\/post\/275337\/\">\u041f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 spring-boot-starter<\/a> \u0438 <a href=\"https:\/\/habr.com\/ru\/post\/462541\/\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Conditional \u0432 Spring<\/a><\/li>\n<li>H\u0430 Baeldung: <a href=\"https:\/\/www.baeldung.com\/spring-vs-spring-boot\" rel=\"nofollow\">A Comparison Between Spring and Spring Boot<\/a>, <a href=\"https:\/\/www.baeldung.com\/spring-boot-custom-auto-configuration\" rel=\"nofollow\">Create a Custom Auto-Configuration with Spring Boot<\/a>, <a href=\"https:\/\/www.baeldung.com\/spring-boot-starters\" rel=\"nofollow\">Intro to Spring Boot Starters<\/a>, <a href=\"https:\/\/www.baeldung.com\/spring-boot-main-class\" rel=\"nofollow\">Spring Boot: Configuring a Main Class<\/a><\/li>\n<li><a href=\"https:\/\/www.marcobehler.com\/guides\/spring-boot\" rel=\"nofollow\">What is Spring Boot? Autoconfigurations In-Depth<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/in28minutes\/SpringBootForBeginners\" rel=\"nofollow\">Spring Boot for beginners<\/a><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#boot-documentation\" rel=\"nofollow\">Spring Boot Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/spring-projects\/spring-boot\/tree\/master\/spring-boot-project\/spring-boot-starters\" rel=\"nofollow\">\u0421\u043f\u0438\u0441\u043e\u043a<\/a> \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u043e\u0432<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">27. \u041a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f http-\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Spring?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c Spring \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>Spring MVC<\/li>\n<li>Spring WebFlux<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 <strong>Spring MVC<\/strong> \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/DispatcherServlet.html\" rel=\"nofollow\">DispatcherServlet<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c <code>Servlet<\/code>&#8216;\u043e\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d <a href=\"http:\/\/design-pattern.ru\/patterns\/front-controller.html\" rel=\"nofollow\">Front Controller<\/a>: \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 Http-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438. \u0414\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>DispatcherServlet<\/code> <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-servlet-context-hierarchy\" rel=\"nofollow\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442<\/a> <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/context\/WebApplicationContext.html\" rel=\"nofollow\">WebApplicationContext<\/a>. <code>DispatcherServlet<\/code> \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-servlet-special-bean-types\" rel=\"nofollow\">&quot;\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u043d\u043e\u0432&quot;<\/a> <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-servlet-sequence\" rel=\"nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/a>:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 <code>DispatcherServlet<\/code> \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0435\u043c\u0443 (\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435) \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/HandlerMapping.html\" rel=\"nofollow\">HandlerMapping<\/a>, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442, \u043c\u0435\u0442\u043e\u0434 \u043a\u0430\u043a\u043e\u0433\u043e <code>Controller<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>HandlerMapping<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/handler\/BeanNameUrlHandlerMapping.html\" rel=\"nofollow\">BeanNameUrlHandlerMapping<\/a> \u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/method\/annotation\/RequestMappingHandlerMapping.html\" rel=\"nofollow\">RequestMappingHandlerMapping<\/a> (\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/method\/RequestMappingInfo.html\" rel=\"nofollow\">RequestMappingInfo<\/a> \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/bind\/annotation\/RequestMapping.html\" rel=\"nofollow\">@RequestMapping<\/a> \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/stereotype\/Controller.html\" rel=\"nofollow\">@Controller<\/a>). <code>HandlerMapping<\/code> \u043f\u043e <a href=\"https:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/servlet\/http\/HttpServletRequest.html?is-external=true\" rel=\"nofollow\">HttpServletRequest<\/a> \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u2014 handler-\u043e\u0431\u044a\u0435\u043a\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/method\/HandlerMethod.html\" rel=\"nofollow\">HandlerMethod<\/a>). \u041a\u0430\u0436\u0434\u044b\u0439 <code>HandlerMapping<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/HandlerInterceptor.html\" rel=\"nofollow\">HandlerInterceptor<\/a> \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-handlermapping-interceptor\" rel=\"nofollow\">\u043f\u0440\u0435\u0434- \u0438 \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/a> \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0437 <code>HandlerInterceptor<\/code>&#8216;\u043e\u0432 \u0438 handler-\u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/HandlerExecutionChain.html\" rel=\"nofollow\">HandlerExecutionChain<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>DispatcherServlet<\/code>.<\/li>\n<li>\u0414\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/HandlerAdapter.html\" rel=\"nofollow\">HandlerAdapter<\/a> \u0438\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/HttpRequestHandlerAdapter.html\" rel=\"nofollow\">HttpRequestHandlerAdapter<\/a> (\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/HttpRequestHandler.html\" rel=\"nofollow\">HttpRequestHandler<\/a>), <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/SimpleControllerHandlerAdapter.html\" rel=\"nofollow\">SimpleControllerHandlerAdapter<\/a> (\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/Controller.html\" rel=\"nofollow\">Controller<\/a>) \u0438\u043b\u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/method\/annotation\/RequestMappingHandlerAdapter.html\" rel=\"nofollow\">RequestMappingHandlerAdapter<\/a> (\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 <code>@RequestMapping<\/code>).<\/li>\n<li>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>applyPreHandle<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>HandlerExecutionChain<\/code>. \u0415\u0441\u043b\u0438 \u043e\u043d \u0432\u0435\u0440\u043d\u0451\u0442 <code>true<\/code>, \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 <code>HandlerInterceptor<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0441\u0432\u043e\u044e \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. <code>false<\/code> \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 <code>HandlerInterceptor<\/code> \u0432\u0437\u044f\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0441\u0435\u0431\u044f \u0432 \u043e\u0431\u0445\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. <\/li>\n<li>\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 <code>HandlerAdapter<\/code> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0438\u0437 <code>HandlerExecutionChain<\/code> \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>handle<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/li>\n<li>\u041c\u0435\u0442\u043e\u0434-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 <code>Controller<\/code> (\u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 <code>handle<\/code>) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 <code>DispatcherServlet<\/code> <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/ModelAndView.html\" rel=\"nofollow\">ModelAndView<\/a>. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/ViewResolver.html\" rel=\"nofollow\">ViewResolver<\/a> <code>DispatcherServlet<\/code> <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-viewresolver\" rel=\"nofollow\">\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442<\/a>, \u043a\u0430\u043a\u043e\u0439 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/View.html\" rel=\"nofollow\">View<\/a> \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<br \/>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 REST-Controller \u0438\u043b\u0438 RESTful-\u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e <code>ModelAndView<\/code> \u0432 <code>DispatcherServlet<\/code> \u0438\u0437 <code>Controller<\/code> \u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f <code>null<\/code> \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0438\u043a\u0430\u043a\u043e\u0439 <code>ViewResolver<\/code> \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u2014 \u043e\u0442\u0432\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 <a href=\"https:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/servlet\/http\/HttpServletResponse.html\" rel=\"nofollow\">HttpServletResponse<\/a> \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>handle<\/code>. \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c RESTful-\u043c\u0435\u0442\u043e\u0434\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/bind\/annotation\/ResponseBody.html\" rel=\"nofollow\">@ResponseBody<\/a> \u043b\u0438\u0431\u043e \u0432\u043c\u0435\u0441\u0442\u043e <code>@Controller<\/code> \u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/bind\/annotation\/RestController.html\" rel=\"nofollow\">@RestController<\/a>, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 RESTful.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>HandlerExecutionChain<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>applyPostHandle<\/code> \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>HandlerInterceptor<\/code>\u043e\u0432.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0442\u043e \u043e\u043d\u043e <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc-exceptionhandlers\" rel=\"nofollow\">\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/HandlerExceptionResolver.html\" rel=\"nofollow\">HandlerExceptionResolver<\/a>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/method\/annotation\/ExceptionHandlerExceptionResolver.html\" rel=\"nofollow\">ExceptionHandlerExceptionResolver<\/a> (\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/bind\/annotation\/ExceptionHandler.html\" rel=\"nofollow\">@ExceptionHandler<\/a>), <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/annotation\/ResponseStatusExceptionResolver.html\" rel=\"nofollow\">ResponseStatusExceptionResolver<\/a> (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/bind\/annotation\/ResponseStatus.html\" rel=\"nofollow\">@ResponseStatus<\/a> \u0432 \u043a\u043e\u0434\u044b HTTP-\u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432) \u0438 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/servlet\/mvc\/support\/DefaultHandlerExceptionResolver.html\" rel=\"nofollow\">DefaultHandlerExceptionResolver<\/a> (\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Spring MVC \u0432 \u043a\u043e\u0434\u044b HTTP-\u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432).<\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c <code>Controller<\/code> \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a <code>View<\/code> \u0441\u043e\u0437\u0434\u0430\u043d, <code>DispatcherServlet<\/code> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 <code>View<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>HttpServletResponse<\/code>. \u0414\u043b\u044f REST-Controller \u043e\u0442\u0432\u0435\u0442 \u0434\u0430\u043d\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0435\u0434\u044c \u043e\u0442\u0432\u0435\u0442 \u0443\u0436\u0435 \u0432 <code>HttpServletResponse<\/code>.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c Accept, Spring MVC \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/http\/converter\/HttpMessageConverter.html\" rel=\"nofollow\">HttpMessageConverter<\/a> \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 \u0442\u043e\u0433\u043e, \u043a\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u0442\u0438\u043f\u043e\u0432 POJO \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Accept. <code>HttpMessageConverter<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043e\u0431\u043e\u0438\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445: \u0442\u0435\u043b\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 Java \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0430 Java \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u0430 HTTP \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<br \/>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, Spring Boot \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <code>HttpMessageConverter<\/code>, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u0430 \u0437\u0430\u0434\u0430\u0447, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>HttpMessageConverter<\/code> \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u0430, \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 Spring MVC \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/servlet\/Filter.html?is-external=true\" rel=\"nofollow\">javax.servlet.Filter<\/a> \u043a\u0430\u043a \u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u0430\u043a \u0438 \u043f\u043e\u0441\u043b\u0435. Sring MVC \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/filter\/package-summary.html\" rel=\"nofollow\">\u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c Spring Security, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432. \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/346628\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/336816\/\">Spring MVC \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/346628\/\">\u041f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c Spring Security<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-dispatcherservlet\" rel=\"nofollow\">An Intro to the Spring DispatcherServlet<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-mvc-handler-adapters\" rel=\"nofollow\">HandlerAdapters in Spring MVC<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-controllers\" rel=\"nofollow\">Quick Guide to Spring Controllers<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-requestmapping\" rel=\"nofollow\">Spring RequestMapping<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-httpmessageconverter-rest\" rel=\"nofollow\">Http Message Converters with the Spring Framework<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/spring-boot-add-filter\" rel=\"nofollow\">How to Define a Spring Boot Filter?<\/a> \u043d\u0430 Bealdung<\/li>\n<li><a href=\"https:\/\/jakubstas.com\/spring-professional-study-notes\/#.WUaMx2jytzo\" rel=\"nofollow\">Spring Professional Study Notes<\/a><\/li>\n<li><a href=\"https:\/\/spring.io\/guides\/topicals\/spring-security-architecture\/\" rel=\"nofollow\">Spring Security Architecture<\/a><\/li>\n<li><a href=\"https:\/\/terasolunaorg.github.io\/guideline\/1.0.1.RELEASE\/en\/Overview\/SpringMVCOverview.html#id1\" rel=\"nofollow\">\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#mvc\" rel=\"nofollow\">Spring Web MVC<\/a><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#boot-features-spring-mvc-auto-configuration\" rel=\"nofollow\">Spring MVC Auto-configuration \u0432 Spring Boot<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Spring WebFlux<\/strong> \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 Spring Framework 5.0. \u041e\u043d \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 Servlet API (\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Servlet 3.1+containers, \u0445\u043e\u0442\u044f \u0447\u0430\u0449\u0435 \u044d\u0442\u043e <a href=\"https:\/\/netty.io\/\" rel=\"nofollow\">Netty<\/a> (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Spring Boot) \u0438\u043b\u0438 <a href=\"https:\/\/undertow.io\/\" rel=\"nofollow\">Undertow<\/a>), \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e <a href=\"https:\/\/www.reactive-streams.org\/\" rel=\"nofollow\">Reactive Streams<\/a> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/projectreactor.io\/\" rel=\"nofollow\">\u043f\u0440\u043e\u0435\u043a\u0442\u0430 Reactor<\/a>.<br \/>  \u0412 Spring WebFlux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0438\u0437 Spring MVC (RestController, RequestMapping \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-controller\" rel=\"nofollow\">\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-fn\" rel=\"nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432<\/a>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-fn-handler-functions\" rel=\"nofollow\">HandlerFunction<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412 Spring WebFlux \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0443\u0440\u043e\u0432\u043d\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/http\/server\/reactive\/HttpHandler.html\" rel=\"nofollow\">HttpHandler<\/a> \u2014 \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e I\/O, Reactive Streams back pressure \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0434\u043b\u044f Reactor Netty, Undertow \u0438 \u0442.\u0434.<\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/WebHandler.html\" rel=\"nofollow\">WebHandler<\/a> \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 API \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 <code>HttpHandler<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u0430\u043a \u0435\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/WebExceptionHandler.html\" rel=\"nofollow\">WebExceptionHandler<\/a>, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/WebFilter.html\" rel=\"nofollow\">WebFilter<\/a> \u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/WebHandler.html\" rel=\"nofollow\">WebHandler<\/a>. \u0421\u0431\u043e\u0440\u043a\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/adapter\/WebHttpHandlerBuilder.html\" rel=\"nofollow\">WebHttpHandlerBuilder<\/a> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/context\/ApplicationContext.html\" rel=\"nofollow\">ApplicationContext<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Spring WebFlux \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/DispatcherHandler.html\" rel=\"nofollow\">DispatcherHandler<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/server\/WebHandler.html\" rel=\"nofollow\">WebHandler<\/a> \u0438 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d <a href=\"http:\/\/design-pattern.ru\/patterns\/front-controller.html\" rel=\"nofollow\">Front Controller<\/a>: \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 Http-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438. <code>DispatcherHandler<\/code> \u2014 \u044d\u0442\u043e Spring bean, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/context\/ApplicationContextAware.html\" rel=\"nofollow\">ApplicationContextAware<\/a> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d. <code>DispatcherHandler<\/code> \u0441 \u0431\u0438\u043d-\u0438\u043c\u0435\u043d\u0435\u043c <code>webHandler<\/code> \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 <code>WebHttpHandlerBuilder<\/code> \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>WebHandler<\/code>.<\/p>\n<p>  <\/p>\n<p><code>DispatcherHandler<\/code> \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 http-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-special-bean-types\" rel=\"nofollow\">&quot;\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u0438\u043d\u0430\u043c&quot;<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e \u0438 \u0437\u0430\u043c\u0435\u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">    @Override     public Mono&lt;Void&gt; handle(ServerWebExchange exchange) {         if (this.handlerMappings == null) {             return createNotFoundError();         }         return Flux.fromIterable(this.handlerMappings)                 .concatMap(mapping -&gt; mapping.getHandler(exchange))                 .next()                 .switchIfEmpty(createNotFoundError())                 .flatMap(handler -&gt; invokeHandler(exchange, handler))                 .flatMap(result -&gt; handleResult(exchange, result));     }<\/code><\/pre>\n<p>  <\/p>\n<ol>\n<li>\u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/HandlerMapping.html\" rel=\"nofollow\">HandlerMapping<\/a> \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0434\u043e\u0431\u0430\u044e\u0449\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0442\u043e\u0434, \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430). \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a (<code>handler<\/code>). \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 <code>HandlerMapping<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<br \/> \n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/result\/method\/annotation\/RequestMappingHandlerMapping.html\" rel=\"nofollow\">RequestMappingHandlerMapping<\/a> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <code>@RequestMapping<\/code><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/function\/server\/support\/RouterFunctionMapping.html\" rel=\"nofollow\">RouterFunctionMapping<\/a> \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/handler\/SimpleUrlHandlerMapping.html\" rel=\"nofollow\">SimpleUrlHandlerMapping<\/a> \u0434\u043b\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 URL-\u043e\u0432 \u043d\u0430 \u0431\u0438\u043d\u044b-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n<\/ul>\n<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u0439\u0434\u0435\u043d, \u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0433\u043e (\u0432 <code>invokeHandler<\/code>) \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/HandlerAdapter.html\" rel=\"nofollow\">HandlerAdapter<\/a>, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434 <code>handle<\/code> \u0434\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/HandlerResult.html\" rel=\"nofollow\">HandlerResult<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>DispatcherHandler<\/code>. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 <code>HandlerAdapter<\/code> \u2014 \u0441\u043a\u0440\u044b\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043e\u0442 <code>DispatcherHandler<\/code>. \u041f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <code>HandlerAdapter<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<br \/> \n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/result\/method\/annotation\/RequestMappingHandlerAdapter.html\" rel=\"nofollow\">RequestMappingHandlerAdapter<\/a> \u2014 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <code>@RequestMapping<\/code><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/function\/server\/support\/HandlerFunctionAdapter.html\" rel=\"nofollow\">HandlerFunctionAdapter<\/a> \u2014 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/function\/server\/HandlerFunction.html\" rel=\"nofollow\">HandlerFunctions<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 <code>HandlerResult<\/code> \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f (\u0432 <code>handleResult<\/code>) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/HandlerResultHandler.html\" rel=\"nofollow\">HandlerResultHandler<\/a>. \u0417\u0434\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-resulthandling\" rel=\"nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e<\/a> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <code>HandlerResultHandler<\/code>:<br \/> \n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/result\/method\/annotation\/ResponseEntityResultHandler.html\" rel=\"nofollow\">ResponseEntityResultHandler<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/http\/ResponseEntity.html\" rel=\"nofollow\">ResponseEntity<\/a>, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0437 <code>@Controller<\/code><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/function\/server\/support\/ServerResponseResultHandler.html\" rel=\"nofollow\">ServerResponseResultHandler<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/function\/server\/ServerResponse.html\" rel=\"nofollow\">ServerResponse<\/a>, \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432<\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/result\/method\/annotation\/ResponseBodyResultHandler.html\" rel=\"nofollow\">ResponseBodyResultHandler<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 <code>@ResponseBody<\/code>, \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 <code>@RestController<\/code><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/org\/springframework\/web\/reactive\/result\/view\/ViewResolutionResultHandler.html\" rel=\"nofollow\">ViewResolutionResultHandler<\/a> \u2014 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux-viewresolution\" rel=\"nofollow\">View Resolution<\/a> \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0442\u0438\u043f\u043e\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#webflux\" rel=\"nofollow\">Spring WebFlux<\/a><\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/htmlsingle\/#boot-features-webflux-auto-configuration\" rel=\"nofollow\">Spring WebFlux Auto-configuration \u0432 Spring Boot<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"prodolzhenie-sleduet\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/529214\/\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e Hibernate, \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u0445 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0438 \u0438 \u043f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433\u0438.<\/p>\n<\/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=\"https:\/\/habr.com\/ru\/post\/529210\/\"> https:\/\/habr.com\/ru\/post\/529210\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/za\/zu\/y0\/zazuy0hba1v-ng8d9xebitr8w7k.jpeg\"><\/div>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b \u0441\u0435\u0440\u0438\u044e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 Backend-Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u0435\u0431\u0435 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u043e\u0434\u0443\u043c\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0443\u043b \u0441 \u043d\u0435\u0433\u043e \u043f\u044b\u043b\u044c, \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0434\u0435\u043b\u044e\u0441\u044c \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c. \u041d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e: \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0438 \u043c\u043d\u043e\u0433\u043e \u0433\u0434\u0435 \u0435\u0449\u0451 \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 (\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438) \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 \u0431\u044b\u043b\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c \u2014 \u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u044b \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u043f\u043b\u044e\u0441-\u043c\u0438\u043d\u0443\u0441 middle, \u0449\u0435\u0434\u0440\u043e \u043f\u0440\u0438\u043f\u0440\u0430\u0432\u0438\u0432 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0439. \u041d\u0430 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0425\u0430\u0431\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a \u0441\u043e\u0431\u0435\u0441\u0430\u043c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e Java \u0438 Spring, \u0430 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u2014 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/529214\/\">\u0442\u0443\u0442<\/a><\/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-313544","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313544","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=313544"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313544\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}