{"id":225,"date":"2018-04-15T05:44:53","date_gmt":"2018-04-15T05:44:53","guid":{"rendered":"https:\/\/nurlandroid.com\/?p=225"},"modified":"2020-08-09T11:26:24","modified_gmt":"2020-08-09T11:26:24","slug":"kotlin","status":"publish","type":"post","link":"https:\/\/nurlandroid.com\/?p=225","title":{"rendered":"Kotlin"},"content":{"rendered":"<p><span style=\"color: #000000;\">\u041c\u044b\u0441\u043b\u0438 \u043e Kotlin. \u0417\u0430\u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c? \u041a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u0442?<\/span><!--more--><\/p>\n<p><span style=\"color: #000000;\">1.\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u043f\u0440\u043e NPE \u0432\u00a0\u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c<\/span><\/li>\n<li><span style=\"color: #000000;\"> \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437\u00a0SDK<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043c\u043e\u0436\u043d\u043e \u043b\u044f\u043c\u0431\u0434\u044b \u0438\u00a0\u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0438\u0441\u0430\u0442\u044c <\/span><\/li>\n<li><span style=\"color: #000000;\">\u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u00a0\u043c\u0435\u0442\u043e\u0434\u044b<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">Kotlin \u043d\u0430\u00a0100% \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u00a0Java, \u0438\u00a0\u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 java-\u043a\u043e\u0434 \u0432\u00a0\u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0kotlin-\u043a\u043e\u0434. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u0430\u044f\u00a0<strong>TestActivity<\/strong>\u00a0\u043d\u0430\u00a0Kotlin \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u00a0<strong>AppCompatActivity<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u0435\u0436\u0438\u0442 \u0432\u00a0Support Library, \u0430\u00a0\u043d\u0435\u00a0\u0432\u00a0SDK.<\/span><\/p>\n<p><span style=\"color: #000000;\">2.\u00a0<\/span><\/p>\n<p><span style=\"color: #000000;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u00a0\u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0434\u0430\u0442\u0430-\u043a\u043b\u0430\u0441\u0441\u0435:<\/span><\/p>\n<pre class=\"hljs java\"><span style=\"color: #000000;\"><span class=\"hljs-keyword\">public<\/span>\u00a0<span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span>\u00a0<span class=\"hljs-title\">Message<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">private<\/span>\u00a0String\u00a0text;\n\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">private<\/span>\u00a0<span class=\"hljs-keyword\">boolean<\/span>\u00a0isRead;\n\n\u00a0\u00a0\u00a0<span class=\"hljs-function\"><span class=\"hljs-keyword\">public<\/span>\u00a0<span class=\"hljs-title\">Message<\/span><span class=\"hljs-params\">(String\u00a0text,\u00a0<span class=\"hljs-keyword\">boolean<\/span>\u00a0isRead)<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">this<\/span>.text\u00a0=\u00a0text;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">this<\/span>.isRead\u00a0=\u00a0isRead;\n\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0<span class=\"hljs-function\"><span class=\"hljs-keyword\">public<\/span>\u00a0String\u00a0<span class=\"hljs-title\">getText<\/span><span class=\"hljs-params\">()<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">return<\/span>\u00a0text;\n\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0<span class=\"hljs-function\"><span class=\"hljs-keyword\">public<\/span>\u00a0<span class=\"hljs-keyword\">boolean<\/span>\u00a0<span class=\"hljs-title\">isRead<\/span><span class=\"hljs-params\">()<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"hljs-keyword\">return<\/span>\u00a0isRead;\n\u00a0\u00a0\u00a0}\n}\n<\/span><\/pre>\n<p><span style=\"color: #000000;\">\u0438\u00a0\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u043d\u0435\u043c \u0435\u0433\u043e \u0432\u00a0kotlin-\u0444\u0430\u0439\u043b:<\/span><\/p>\n<p><span style=\"color: #000000;\"><code>class\u00a0Message(val\u00a0text:\u00a0String,\u00a0val\u00a0isRead:\u00a0Boolean)<\/code><\/span><\/p>\n<p><span style=\"color: #000000;\">\u041e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u043f\u043e\u00a0\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441\u00a014-\u044e\u00a0\u0432\u00a0Java-\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435! \u0410\u00a0\u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043f\u0435\u0440\u0435\u0434 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u00a0<strong><em>data<\/em><\/strong>, \u0442\u043e\u00a0\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430\u00a0<strong><em>copy()<\/em><\/strong>. \u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u043d\u00a0\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0417\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0435\u0449\u0435 \u043e\u0447\u043a\u043e \u0432\u00a0\u043f\u043e\u043b\u044c\u0437\u0443 Kotlin.<\/span><\/p>\n<p><span style=\"color: #000000;\">3.<\/span><\/p>\n<p><span style=\"color: #000000;\">\u0410 \u0442\u0430\u043a\u0436\u0435:<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u043c \u043d\u0435\u00a0\u043d\u0443\u0436\u043d\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e\u00a0<strong>new<\/strong>;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435\u00a0<strong>extends<\/strong>\u00a0\u0438\u043b\u0438\u00a0<strong>implements<\/strong>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u00ab:\u00bb;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d<\/span>\u00a0<strong><a href=\"https:\/\/kotlinlang.org\/docs\/reference\/classes.html\" target=\"_blank\" rel=\"noopener noreferrer\">primary constructor<\/a><\/strong>\u00a0<span style=\"color: #000000;\">\u0438\u00a0\u043e\u0434\u0438\u043d\/\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00a0<strong>secondary constructors<\/strong>;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0443\u00a0<strong>primary constructor<\/strong>\u00a0\u043d\u0435\u0442 \u0442\u0435\u043b\u0430, \u043d\u043e\u00a0\u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043b\u043e\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00a0<strong>init<\/strong>;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\u00a0<strong>var\u00a0<\/strong>(mutable property)\/<strong>val\u00a0<\/strong>(read-only property) \u0434\u043b\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0438\u00a0\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/properties.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>properties<\/strong><\/a>\u00a0<span style=\"color: #000000;\">\u043f\u0440\u044f\u043c\u043e \u0432\u00a0\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430. \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\u00a0<strong><em>val<\/em><\/strong>\\<strong><em>var<\/em><\/strong>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u00a0\u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445;<\/span><\/li>\n<li><span style=\"color: #000000;\">OMG!, \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c<\/span><a href=\"https:\/\/kotlinlang.org\/docs\/reference\/functions.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u00a0<strong>named arguments<\/strong><\/a>\u00a0<span style=\"color: #000000;\">\u0438\u00a0\u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0438\u0445;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435\u00a0<strong>accessors<\/strong>\u00a0\u2014 \u043a\u0440\u0443\u0442\u044c! \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u00a0\u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u00a0<strong>getter<\/strong>\/<strong>setter<\/strong>\u00a0\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f\/\u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u00a0\u2014 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u00a0\u0438\u043c\u0435\u043d\u0438\u00a0\u2014 \u0442\u043e\u0436\u0435 \u0437\u0434\u041e\u0440\u043e\u0432\u043e!<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432\/\u043c\u0435\u0442\u043e\u0434\u043e\u0432\/\u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0435\u0439\u00a0\u2014\u00a0<strong>public<\/strong>;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0432\u00a0Kotlin\u00a0<strong>final<\/strong>\u00a0\u0438\u00a0\u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<strong>open<\/strong>-\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u00a0\u2014 \u043a\u00a0\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u044b\u043a\u0430\u0442\u044c;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0433\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b!!! \u0422.\u0435. \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0442\u044c \u0434\u0432\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u00a0\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u043e\u0439, \u0438\u00a0\u044f\u00a0\u0441\u043c\u043e\u0433\u0443 \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 \u0438\u0437\u00a0\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412\u043e\u0442 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u0442\u043e! \u041e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e \u043e\u0431\u00a0\u044d\u0442\u043e\u043c \u043c\u0435\u0447\u0442\u0430\u043b;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0436\u0435\u043d\u0435\u0440\u0438\u043a\u043e\u0432 (<strong>generics<\/strong>) \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/generics.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>in<\/strong>\/<strong>out<\/strong><\/a><span style=\"color: #000000;\">-\u043a\u0435\u0439\u0432\u043e\u0440\u0434\u043e\u0432;<\/span><\/li>\n<li><span style=\"color: #000000;\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<strong>anonymous inner classes\u00a0<\/strong>\u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/object-declarations.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>object expressions<\/strong>\u00a0&amp;\u00a0<strong>object declarations<\/strong><\/a>;<\/li>\n<li><span style=\"color: #000000;\">\u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 Singleton \u043b\u0435\u0433\u043a\u043e \u0438\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/object-declarations.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>object declaration<\/strong><\/a>;<\/li>\n<li><span style=\"color: #000000;\">Java\u00a0<strong>static methods<\/strong>\u00a0==<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/object-declarations.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>object declaration + companion object<\/strong><\/a>;<\/li>\n<li><span style=\"color: #000000;\">\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e<\/span>\u00a0<a href=\"https:\/\/kotlinlang.org\/docs\/reference\/delegation.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>by<\/strong>-clause<\/a><span style=\"color: #000000;\">, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0430\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b\u00a0\u2014 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0440\u0430\u0434\u0443\u0439\u0442\u0435\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u00a0\u043d\u0443\u0436\u043d\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043c\u0435\u0442\u043e\u0434\u044b!<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">4.<\/span><\/p>\n<p><span style=\"color: #000000;\">\u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c java-\u043a\u043e\u0434 \u0438\u00a0\u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u00a0kotlin-\u0444\u0430\u0439\u043b \u0438\u00a0IDE \u0441\u0430\u043c\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0435\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u043d\u0443\u0442\u044c. \u041a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430\u00a0Java \u043c\u043e\u0436\u043d\u043e \u0438\u00a0\u0432\u00a0kotlin-\u0444\u0430\u0439\u043b\u0430\u0445 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u0438\u00a0\u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0431\u043e\u043d\u0443\u0441 100%-\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438. \u0422\u0430\u043c\u00a0\u0436\u0435 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e IDE \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0438\u00a0\u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043a\u00a0kotlin-style.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u044b\u0441\u043b\u0438 \u043e Kotlin. \u0417\u0430\u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c? \u041a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u0442?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-kotlin"],"_links":{"self":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225"}],"version-history":[{"count":7,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}