{"id":225585,"date":"2014-06-08T17:04:03","date_gmt":"2014-06-08T13:04:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=225585"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=225585","title":{"rendered":"<span class=\"post_title\">\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 Java, \u0427\u0430\u0441\u0442\u044c II (checked\/unchecked)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 (\u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 <a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/223821\/\">try-catch-finally<\/a>), \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u043a\u043e\u043c\u0443 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u043c\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 Java \u043a\u0430\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u0432\u043e\u0434\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043a \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <a href=\"#1\">1. \u041c\u0430\u0433\u0438\u044f checked\/unchecked<\/a><br \/>  <a href=\"#2\">2. \u041f\u0435\u0441\u0441\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c<\/a><br \/>  <a href=\"#3\">3. throws \u0441 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u043c (unckecked) \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c<\/a><br \/>  <a href=\"#4\">4. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/a><br \/>  <a href=\"#5\">5. \u0418\u043b\u0438 catch, \u0438\u043b\u0438 throws<\/a><br \/>  <a href=\"#6\">6. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\/JVM<\/a><br \/>  <a href=\"#7\">7. Overriding \u0438 throws<\/a><br \/>  <a href=\"#8\">8. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443<\/a><\/p>\n<p>  <a name=\"1\"><\/a>  <\/p>\n<h4>1. \u00ab\u041c\u0430\u0433\u0438\u044f\u00bb checked\/unchecked<\/h4>\n<p>  \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432 Java \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0434\u0432\u0443\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u00ab\u043c\u0430\u0433\u0438\u0438\u00bb, \u0442.\u0435. \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435:<br \/>  1. \u00ab\u041c\u0430\u0433\u0438\u044e\u00bb java.lang.Throwable \u2014 \u0432 throw, catch \u0438 throws \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e Throwable \u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 (<a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/223821\/\/#1\">\u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043b\u0435\u043a\u0446\u0438\u0438<\/a>). \u042d\u0442\u043e \u00ab\u043f\u0440\u0430\u0432\u043e\u00bb \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 throw, catch \u0438 throws \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435.<br \/>  2. \u0412\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u00ab\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435\u00bb (checked) \u0438 \u00ab\u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435\u00bb (unchecked). \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0441\u0443\u0449\u0435 \u00ab\u043a\u043e\u0440\u043d\u0435\u0432\u0438\u0449\u0443\u00bb (Throwable, Error, Exception, RuntimeException) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443. \u041d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u0438\u0434\u0438\u043c\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e<br \/>   \u2014 Throwable \u0438 Exception \u0438 \u0432\u0441\u0435 \u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 Error-\u0430 \u0438 RuntimeException-\u0430) \u2014 checked<br \/>   \u2014 Error \u0438 RuntimeException \u0438 \u0432\u0441\u0435 \u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 \u2014 unchecked<\/p>\n<p>  checked exception = \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c.<br \/>  \u0427\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0430 \u044d\u0442\u043e\u0439 \u043b\u0435\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439  <\/p>\n<pre><code>                    Object                       |                   Throwable                   \/      \\               Error     Exception                             |                     RuntimeException <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 checked\/unchecked  <\/p>\n<pre><code>                    Object                       |                Throwable(CHECKED)                \/            \\      Error(UNCHECKED)    Exception(CHECKED)                             |                   RuntimeException(UNCHECKED) <\/code><\/pre>\n<p>  <a name=\"2\"><\/a>  <\/p>\n<h4>2. \u041f\u0435\u0441\u0441\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c<\/h4>\n<p>  \u042f \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u043c\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 throws \u2014 \u00ab\u043f\u0435\u0441\u0441\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0439\u00bb, \u043f\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u00ab\u043d\u0430\u043f\u0443\u0433\u0430\u0442\u044c\u00bb \u043e \u0431\u043e\u043b\u044c\u0448\u0435\u043c, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043d\u043e \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0431\u0440\u043e\u0441\u0430\u0442\u044c, \u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         throw new Exception(); \/\/ \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438     } }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Exception <\/code><\/pre>\n<p>  \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0431\u0440\u043e\u0441\u0430\u0442\u044c, \u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u043e \u00ab\u043c\u0435\u043d\u044c\u0448\u0435\u043c\u00bb  <\/p>\n<pre><code>import java.io.IOException;  public class App {     public static void main(String[] args) throws IOException {         throw new Exception(); \/\/ \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438     } }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Exception <\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0430\u0435\u043c  <\/p>\n<pre><code>public class App {     public static void main(String[] args) throws Exception { \/\/ \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u043c \u043e Exception         throw new Exception(); \/\/ \u0438 \u043a\u0438\u0434\u0430\u0435\u043c Exception     } } <\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u043e \u0431\u043e\u043b\u044c\u0448\u0435\u043c, \u0447\u0435\u043c \u043c\u044b \u0431\u0440\u043e\u0441\u0430\u0435\u043c  <\/p>\n<pre><code>public class App {     public static void main(String[] args) throws Throwable { \/\/ \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u043c &quot;\u0446\u0435\u043b\u043e\u043c&quot; Throwable         throw new Exception(); \/\/ \u0430 \u043a\u0438\u0434\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e Exception     } } <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u0435\u043c \u0434\u0430\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442  <\/p>\n<pre><code>public class App {     public static void main(String[] args) throws Exception { \/\/ \u043f\u0443\u0433\u0430\u0435\u043c         \/\/ \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0440\u043e\u0441\u0430\u0435\u043c     } } <\/code><\/pre>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0435\u0433\u043e \u043d\u0435\u0442 \u2014 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0431\u043e\u044f\u0442\u044c\u0441\u044f  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         f(); \/\/ \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438     }      public static void f() throws Exception {     }     }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Exception <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u044f \u043e\u043d\u0438 (\u0438\u0441\u043f\u0443\u0433\u0430\u0432\u0448\u0438\u0435\u0441\u044f) \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u043f\u0443\u0433\u0430\u0442\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435  <\/p>\n<pre><code>public class App {     \/\/ \u043e\u043d\u0438 \u043f\u0443\u0433\u0430\u044e\u0442 \u0446\u0435\u043b\u044b\u043c Throwable     public static void main(String[] args) throws Throwable {          f();     }     \/\/ \u0445\u043e\u0442\u044f \u043c\u044b \u043f\u0443\u0433\u0430\u043b\u0438 \u0432\u0441\u0435\u0433\u043e-\u043b\u0438\u0448\u044c Exception     public static void f() throws Exception {     }     } <\/code><\/pre>\n<p>  \u0412 \u0447\u0435\u043c \u0446\u0435\u043b\u044c \u00ab\u043f\u0435\u0441\u0441\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438\u00bb? \u0412\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e.<br \/>  \u0412\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b\u0438\u00bb, \u0441\u043a\u0430\u0436\u0435\u043c, \u043a\u043b\u0430\u0441\u0441-\u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430  <\/p>\n<pre><code>public class InternetDownloader {     public static byte[] (String url) throws IOException {          return &quot;&lt;html&gt;&lt;body&gt;Nothing! It's stub!&lt;\/body&gt;&lt;\/html&gt;&quot;.getBytes();     } } <\/code><\/pre>\n<p>  \u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u00ab\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u044c\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0423\u0416\u0415 \u041e\u0411\u0420\u0410\u0411\u0410\u0422\u042b\u0412\u0410\u0422\u042c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 IOException, \u0445\u043e\u0442\u044f \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438-\u043f\u0443\u0441\u0442\u044b\u0448\u043a\u0438 \u0432\u044b \u041f\u041e\u041a\u0410 \u041d\u0415 \u0413\u0415\u041d\u0415\u0420\u0418\u0420\u0423\u0415\u0422\u0415 \u0442\u0430\u043a\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c.<\/p>\n<p>  <a name=\"3\"><\/a>  <\/p>\n<h4>3. throws \u0441 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u043c (unckecked) \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c<\/h4>\n<p>  \u0412\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u043f\u0443\u0433\u0430\u0435\u0442\u00bb unchecked \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u0441 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439.  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {          f();     }     public static void f() throws RuntimeException {     }     } <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0441\u043b\u0443\u0436\u0438\u0442 \u0446\u0435\u043b\u0438 \u00ab\u0443\u043a\u0430\u0437\u0430\u0442\u044c\u00bb \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443-\u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043a\u043e\u0434\u0430 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 (unchecked) \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 (java.lang.NumberFormatException \u2014 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435):   <\/p>\n<pre><code>package java.lang;  public final class Integer extends Number implements Comparable&lt;Integer&gt; {     ...     \/**      * ...      *      * @param s    a {@code String} containing the {@code int}      *             representation to be parsed      * @return     the integer value represented by the argument in decimal.      * @exception  NumberFormatException  if the string does not contain a      *               parsable integer.      *\/     public static int parseInt(String s) throws NumberFormatException {         return parseInt(s,10);     }     ... } <\/code><\/pre>\n<p>  Integer.parseInt() \u043c\u043e\u0436\u0435\u0442 \u0431\u0440\u043e\u0441\u0438\u0442\u044c unchecked NumberFormatException \u043d\u0430 \u043d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 (int k = Integer.parseInt(\u00ab123abc\u00bb)), \u044d\u0442\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u043b\u0438<br \/>   \u2014 \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u043c\u0435\u0442\u043e\u0434\u0430: throws NumberFormatException<br \/>   \u2014 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 (javadoc): @ exception<br \/>  \u043d\u043e \u044d\u0442\u043e \u043d\u0438 \u043a \u0447\u0435\u043c\u0443 \u043d\u0430\u0441 \u043d\u0435 \u043e\u0431\u044f\u0437\u044b\u0432\u0430\u0435\u0442.<\/p>\n<p>  <a name=\"4\"><\/a>  <\/p>\n<h4>4. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441 \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. <br \/>  \u0414\u0430\u043b\u0435\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e EOFException \u0438 FileNotFoundException \u2014 \u043f\u043e\u0442\u043e\u043c\u043a\u0438 IOException.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException;  public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c \u041e\u0411\u041e\u0418\u041c\u0418 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438     public static void main(String[] args) throws EOFException, FileNotFoundException {         if (System.currentTimeMillis() % 2 == 0) {             throw new EOFException();         } else {             throw new FileNotFoundException();         }     } } <\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException;  public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c \u041e\u0411\u041e\u0418\u041c\u0418 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438     public static void main(String[] args) throws EOFException, FileNotFoundException {         f0();         f1();     }     public static void f0() throws EOFException {...}     public static void f1() throws FileNotFoundException {...} } <\/code><\/pre>\n<p>  \u0410 \u043c\u043e\u0436\u0435\u043c \u00ab\u0438\u0441\u043f\u0443\u0433\u0430\u0442\u044c\u00bb \u0441\u0438\u043b\u044c\u043d\u0435\u0435 (\u043f\u0440\u0435\u0434\u043a\u043e\u043c \u043e\u0431\u043e\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439)  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException; import java.io.IOException;  public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c \u041f\u0420\u0415\u0414\u041a\u041e\u041c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439     public static void main(String[] args) throws IOException {         if (System.currentTimeMillis() % 2 == 0) {             throw new EOFException();         } else {             throw new FileNotFoundException();         }     } } <\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException;  public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c \u041f\u0420\u0415\u0414\u041a\u041e\u041c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439     public static void main(String[] args) throws IOException {         f0();         f1();     }     public static void f0() throws EOFException {...}     public static void f1() throws FileNotFoundException {...} } <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0438 \u0432\u043e\u0442 \u0442\u0430\u043a: EOFException \u0438 FileNotFoundException \u00ab\u043e\u0431\u043e\u0431\u0449\u0430\u0435\u043c \u0434\u043e\u00bb IOException, \u0430 InterruptedException \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u043c\u00bb (InterruptedException \u2014 \u041d\u0415 \u043f\u043e\u0442\u043e\u043c\u043e\u043a IOException)  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException;  public class App {     public static void main(String[] args) throws IOException, InterruptedException {         f0();         f1();         f2();     }     public static void f0() throws EOFException {...}     public static void f1() throws FileNotFoundException {...}     public static void f2() throws InterruptedException {...} } <\/code><\/pre>\n<p>  <a name=\"5\"><\/a>  <\/p>\n<h4>5. \u0418\u043b\u0438 catch, \u0438\u043b\u0438 throws<\/h4>\n<p>  \u041d\u0435 \u043d\u0430\u0434\u043e \u043f\u0443\u0433\u0430\u0442\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b\u0438<br \/>  \u0442\u0430\u043a  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         try {             throw new Exception();         } catch (Exception e) {             \/\/ ...         }     } } <\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0442\u0430\u043a (\u0441\u0442\u0430\u0432\u0438\u043c catch \u043f\u043e \u043f\u0440\u0435\u0434\u043a\u0443 \u0438 \u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c)  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         try {             throw new Exception();         } catch (Throwable e) {             \/\/ ...         }     } } <\/code><\/pre>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0430, \u0442\u043e \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         try {             throw new Throwable();         } catch (Exception e) {             \/\/ ...         }     } }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Throwable <\/code><\/pre>\n<p>  \u041d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u00ab\u0431\u0440\u0430\u0442\u0430\u00bb  <\/p>\n<pre><code>public class App {     public static void main(String[] args) {         try {             throw new Exception();         } catch (Error e) {             \/\/ ...         }     } }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Exception <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b\u0438, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u0438\u043c \u043d\u0435 \u043f\u0443\u0433\u0430\u0442\u044c  <\/p>\n<pre><code>import java.io.EOFException; import java.io.FileNotFoundException;  public class App {     \/\/ EOFException \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043b\u0438 catch-\u043e\u043c, \u0438\u043c \u043d\u0435 \u043f\u0443\u0433\u0430\u0435\u043c     public static void main(String[] args) throws FileNotFoundException {         try {             if (System.currentTimeMillis() % 2 == 0) {                 throw new EOFException();             } else {                 throw new FileNotFoundException();             }         } catch (EOFException e) {             \/\/ ...         }     } } <\/code><\/pre>\n<p>  <a name=\"6\"><\/a>  <\/p>\n<h4>6. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\/JVM<\/h4>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e <br \/>   \u2014 <strong>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 cheched \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 (compile-time checking)<\/strong><br \/>   \u2014 <strong>\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 (catch) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (runtime checking)<\/strong>  <\/p>\n<pre><code>public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c Exception     public static void main(String[] args) throws Exception {          Throwable t = new Exception(); \/\/ \u0438 \u043b\u0435\u0442\u0435\u0442\u044c \u0431\u0443\u0434\u0435\u0442 Exception         throw t; \/\/ \u043d\u043e \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438      }   }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Throwable <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044f \u0441  <\/p>\n<pre><code>public class App {     public static void main(String[] args) throws Exception {          Object ref = &quot;Hello!&quot;;  \/\/ ref \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443          char c = ref.charAt(0); \/\/ \u043d\u043e \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438      }   }  &gt;&gt; COMPILATION ERROR: Cannot resolve method 'charAt(int)' <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u044f \u0421\u0421\u042b\u041b\u041a\u0410 ref \u0423\u041a\u0410\u0417\u042b\u0412\u0410\u0415\u0422 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 java.lang.String (\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 charAt(int)), \u043d\u043e \u0422\u0418\u041f \u0421\u0421\u042b\u041b\u041a\u0418 \u2014 java.lang.Object (\u0441\u0441\u044b\u043b\u043a\u0430 \u0442\u0438\u043f\u0430 java.lang.Object \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 java.lang.String). \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u00ab\u043b\u0435\u0432\u044b\u0439 \u0442\u0438\u043f\u00bb (\u0442\u0438\u043f \u0441\u0441\u044b\u043b\u043a\u0438, \u0430 \u043d\u0435 \u0442\u0438\u043f \u0441\u0441\u044b\u043b\u0430\u0435\u043c\u043e\u0433\u043e) \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  \u0425\u043e\u0442\u044f \u0412 \u0414\u0410\u041d\u041d\u041e\u0419 \u0421\u0418\u0422\u0423\u0410\u0426\u0418\u0418 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0433 \u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c, \u0447\u0442\u043e t \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 Exception, \u0430 ref \u2014 \u043d\u0430 String, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0443\u0436\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u041c\u041e\u0413\u041b\u0418 \u0411\u042b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u041e\u0422\u0414\u0415\u041b\u042c\u041d\u041e \u0442\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 jar \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c  <\/p>\n<pre><code>\/\/ \u041d\u0415 \u041a\u041e\u041c\u041f\u0418\u041b\u0418\u0420\u0423\u0415\u0422\u0421\u042f! \u0418\u0421\u0421\u041b\u0415\u0414\u0423\u0415\u041c \u0413\u0418\u041f\u041e\u0422\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0423\u042e \u0421\u0418\u0422\u0423\u0410\u0426\u0418\u042e! public class App {     public static void f0(Throwable t) throws Exception {          throw t;     }       public static void f1(Object ref){          char c = ref.charAt(0);     }   }  <\/code><\/pre>\n<p>  \u0410 \u043a\u0442\u043e-\u0442\u043e \u0431\u0435\u0440\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 classpath \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 App.f0(new Throwable()) \u0438\u043b\u0438 App.f1(new Integer(42)). \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 JVM \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0430\u0441\u044c \u0431\u044b \u0441 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442 \u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 f0) \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 f1)!<\/p>\n<p>  Java \u2014 \u044f\u0437\u044b\u043a \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (\u0442.\u0435. \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 (\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 checked \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, &#8230;) \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c), \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (\u044f\u0437\u044b\u043a\u0438 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u2014 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043e\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 JavaScript).<\/p>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0445\u043e\u0442\u044f \u043c\u0435\u0442\u043e\u0434 main \u0413\u0410\u0420\u0410\u041d\u0422\u0418\u0420\u041e\u0412\u0410\u041d\u041d\u041e \u041d\u0415 \u0412\u042b\u0411\u0420\u041e\u0421\u0418\u0422 \u0418\u0421\u041a\u041b\u042e\u0427\u0415\u041d\u0418\u042f  <\/p>\n<pre><code>public class App {     \/\/ \u043f\u0443\u0433\u0430\u0435\u043c Exception     public static void main(String[] args) throws Exception {          try {             Throwable t = new Exception(); \/\/ \u0438 \u043b\u0435\u0442\u0435\u0442\u044c \u0431\u0443\u0434\u0435\u0442 Exception             throw t; \/\/ \u043d\u043e \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438          } catch (Exception e) {             System.out.println(&quot;\u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u043e!&quot;);         }     }   }  &gt;&gt; COMPILATION ERROR: unhandled exception: java.lang.Throwable <\/code><\/pre>\n<pre><code>public class App {     \/\/ \u0422\u0415\u041f\u0415\u0420\u042c \u043f\u0443\u0433\u0430\u0435\u043c Throwable     public static void main(String[] args) throws Throwable {          try {             Throwable t = new Exception(); \/\/ \u0430 \u043b\u0435\u0442\u0435\u0442\u044c \u0431\u0443\u0434\u0435\u0442 Exception             throw t;         } catch (Exception e) { \/\/ \u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u043c Exception             System.out.println(&quot;\u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u043e!&quot;);         }     }   }  &gt;&gt; \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u043e! <\/code><\/pre>\n<p>  <a name=\"7\"><\/a>  <\/p>\n<h4>7. Overriding \u0438 throws<\/h4>\n<p>  \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 (overriding) \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u0442\u043e\u043c\u043a\u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u0443 \u043f\u0440\u0435\u0434\u043a\u0430. <br \/>  \u041d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u00ab\u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u0435\u0435\u00bb \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u043a\u0430:  <\/p>\n<pre><code>import java.io.FileNotFoundException; import java.io.IOException;  public class Parent {     \/\/ \u043f\u0440\u0435\u0434\u043e\u043a \u043f\u0443\u0433\u0430\u0435\u0442 IOException \u0438 InterruptedException     public void f() throws IOException, InterruptedException {} }  class Child extends Parent {     \/\/ \u0430 \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u043f\u0443\u0433\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u043c IOException     @Override     public void f() throws FileNotFoundException {} } <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0443\u0442 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u00ab\u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0442\u0438\u043f\u00bb \u0431\u0440\u043e\u0441\u0430\u0435\u043c\u044b\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439  <\/p>\n<pre><code>import java.io.IOException;  public class Parent {     public void f() throws IOException, InterruptedException {} }  class ChildB extends Parent {     @Override     public void f() throws Exception {} }  &gt;&gt; COMPILATION ERROR: overridden method does not throw 'java.lang.Exception' <\/code><\/pre>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0443\u0436\u0430\u0442\u044c \u0442\u0438\u043f, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c?<br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e:  <\/p>\n<pre><code>public class Parent {     \/\/ \u043f\u0440\u0435\u0434\u043e\u043a \u043f\u0443\u0433\u0430\u0435\u0442 Exception     public void f() throws Exception {} } <\/code><\/pre>\n<pre><code>\/\/ \u0442\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 Java, \u043d\u043e, \u0414\u041e\u041f\u0423\u0421\u0422\u0418\u041c, \u0435\u0435 \u043d\u0435\u0442 public class Child extends Parent {     \/\/ \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b Exception \u0434\u043e Throwable     public void f() throws Throwable {} } <\/code><\/pre>\n<pre><code>public class Demo {     public static void test(Parent ref) {         \/\/ \u0442\u0443\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, Parent.f() \u043f\u0443\u0433\u0430\u0435\u0442 Exception \u0438 \u043c\u044b \u0435\u0433\u043e \u043b\u043e\u0432\u0438\u043c catch         try {             ref.f();         } catch(Exception e) {}     } } <\/code><\/pre>\n<pre><code>public class App {     public static void main(String[] args) {         \/\/ \u0442\u0443\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, Demo.test \u0445\u043e\u0442\u0435\u043b Parent \u0438 \u043c\u044b \u0434\u0430\u043b\u0438 \u0435\u043c\u0443 \u043f\u043e\u0434\u0442\u0438\u043f - Child         Demo.test(new Child());     } } <\/code><\/pre>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0435\u0441\u043b\u0438 \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u043c\u043e\u0433 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0442\u0438\u043f \u0431\u0440\u043e\u0441\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043a\u0430, \u0442\u043e \u0442\u0435 \u043c\u0435\u0441\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u0436\u0434\u0443\u0442\u00bb \u043f\u0440\u0435\u0434\u043a\u0430, \u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u00ab\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e\u00bb \u043f\u043e\u0442\u043e\u043c\u043a\u0430 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043d\u0435\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/p>\n<p>  <a name=\"8\"><\/a>  <\/p>\n<h4>8. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443<\/h4>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0441 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 checked\/unchecked  <\/p>\n<pre><code>                    Object                       |                Throwable(CHECKED)                \/            \\      Error(UNCHECKED)    Exception(CHECKED)                             |                   RuntimeException(UNCHECKED) <\/code><\/pre>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u041d\u0415 \u0421\u0412\u042f\u0417\u0410\u041d\u0410 \u0421 \u041d\u0410\u0421\u041b\u0415\u0414\u041e\u0412\u0410\u041d\u0418\u0415\u041c. \u042d\u0442\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435 (\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445).<br \/>  \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e checked\/unchecked \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0418\u0421\u041a\u041b\u042e\u0427\u0418\u0422\u0415\u041b\u042c\u041d\u041e \u041d\u0410 \u041e\u0421\u041d\u041e\u0412\u0415 \u041d\u0410\u0421\u041b\u0415\u0414\u041e\u0412\u0410\u041d\u0418\u042f.<br \/>  \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<br \/>  1. \u0415\u0441\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 Throwable, Error, Exception, RuntimeException \u2014 \u0442\u043e \u0442\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c.<br \/>  2. \u0415\u0441\u043b\u0438 \u0442\u044b \u043d\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0442\u043e \u0442\u0432\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0440\u0430\u0432\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0434\u043a\u0430. \u041d\u0430\u0440\u0443\u0448\u0438\u0442\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0443\u0442 \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0440\u043e\u0434\u0438\u043c \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 A, B, C, D, E, F, G, H, I, J, K, L \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u00ab\u043a\u043e\u0440\u043d\u0435\u0432\u0438\u0449\u0430\u00bb (Throwable, Error, Exception, RuntimeException), \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 checked\/unchecked \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0441\u0445\u0435\u043c\u0435   <\/p>\n<pre><code>                    Object                       |                Throwable(CHECKED)                \/    |       \\  Error(UNCHECKED)   |   Exception(CHECKED)     |       |       |      |            |     A(UNC)  D(UNC)  |      F(C)        RuntimeException(UNCHECKED)   \/   \\             |     \/   \\             |       | B(UNC) C(UNC)       |   G(C)  H(C)          I(UNC)  J(UNC)                      E(C)                   \/   \\                                         K(UNC) L(UNC) <\/code><\/pre>\n<h4>\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b<\/h4>\n<p>  \u042f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c Java (<a href=\"http:\/\/golovachcourses.com\">\u043a\u0443\u0440\u0441\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>) \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/218841\/\">\u043a\u0443\u0440\u0441\u0430 Java Core<\/a>. \u0412\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438 \u043b\u0435\u043a\u0446\u0438\u0439 \u0432 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 <a href=\"http:\/\/www.youtube.com\/user\/KharkovITCourses\">youtube-\u043a\u0430\u043d\u0430\u043b\u0435<\/a>, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u043e \u043a\u0430\u043d\u0430\u043b\u0430 \u043b\u0443\u0447\u0448\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 <a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/215275\/\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<br \/>  \u041c\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044f  <\/p>\n<ol>\n<li>\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/li>\n<li>\u0441\u0442\u0440\u043e\u044e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443<\/li>\n<li>\u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u0432\u0438\u0433\u0430\u0432\u0448\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 (\u043f\u043e \u043c\u0435\u0440\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438)<\/li>\n<li>\u0434\u0430\u044e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432 (50-100) \u0432\u0441\u0435\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438<\/li>\n<li>\u0434\u0430\u044e \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/li>\n<\/ol>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0443\u043d\u043a\u0442\u0430\u043c #1 (\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b) \u0438 #2(\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443).<\/p>\n<p>  skype: GolovachCourses<br \/>  email: GolovachCourses@gmail.com      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/225585\/\"> http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/225585\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 (\u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 <a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/223821\/\">try-catch-finally<\/a>), \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u043a\u043e\u043c\u0443 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u043c\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 Java \u043a\u0430\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u0432\u043e\u0434\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043a \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <a href=\"#1\">1. \u041c\u0430\u0433\u0438\u044f checked\/unchecked<\/a><br \/>  <a href=\"#2\">2. \u041f\u0435\u0441\u0441\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c<\/a><br \/>  <a href=\"#3\">3. throws \u0441 \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u043c (unckecked) \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c<\/a><br \/>  <a href=\"#4\">4. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/a><br \/>  <a href=\"#5\">5. \u0418\u043b\u0438 catch, \u0438\u043b\u0438 throws<\/a><br \/>  <a href=\"#6\">6. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\/JVM<\/a><br \/>  <a href=\"#7\">7. Overriding \u0438 throws<\/a><br \/>  <a href=\"#8\">8. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443<\/a><\/p>\n<p>  <a name=\"1\"><\/a>  <\/p>\n<h4>1. \u00ab\u041c\u0430\u0433\u0438\u044f\u00bb checked\/unchecked<\/h4>\n<p>  \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432 Java \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0434\u0432\u0443\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u00ab\u043c\u0430\u0433\u0438\u0438\u00bb, \u0442.\u0435. \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435:<br \/>  1. \u00ab\u041c\u0430\u0433\u0438\u044e\u00bb java.lang.Throwable \u2014 \u0432 throw, catch \u0438 throws \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e Throwable \u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 (<a href=\"http:\/\/habrahabr.ru\/company\/golovachcourses\/blog\/223821\/\/#1\">\u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043b\u0435\u043a\u0446\u0438\u0438<\/a>). \u042d\u0442\u043e \u00ab\u043f\u0440\u0430\u0432\u043e\u00bb \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 throw, catch \u0438 throws \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435.<br \/>  2. \u0412\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u00ab\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435\u00bb (checked) \u0438 \u00ab\u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435\u00bb (unchecked). \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0441\u0443\u0449\u0435 \u00ab\u043a\u043e\u0440\u043d\u0435\u0432\u0438\u0449\u0443\u00bb (Throwable, Error, Exception, RuntimeException) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443. \u041d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u0438\u0434\u0438\u043c\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.  <\/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-225585","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/225585","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=225585"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/225585\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}