{"id":171878,"date":"2023-08-11T06:23:51","date_gmt":"2023-08-11T06:23:51","guid":{"rendered":"https:\/\/www.henryharvin.com\/blog\/?p=171878"},"modified":"2024-12-23T10:48:01","modified_gmt":"2024-12-23T10:48:01","slug":"exception-handling-in-java","status":"publish","type":"post","link":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/","title":{"rendered":"Exception Handling in Java Types and Examples"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">To begin with, Exception Handling in Java deals with error this occurs when the program is executed. It can also be mentioned as an error that disrupts the normal flow of the program.&nbsp; Experienced and beginners both encounter this problem, and Java offers an object-oriented way to solve the errors; this is known as exception handling.<\/h2>\n\n\n\n<p>Further talking about, Exception Handling In Java which occurs during runtime errors and does occur for different reasons. Network connectivity issues, Wrong input data, calling a non-existent file, exceeding the memory limits of the Java virtual machine\u2014there are also various types of Java exceptions, such as those that occur at run time, can\u2019t be handled during compilation time, etc.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Types<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Firstly Exception Handling is of two types: user-defined exceptions and built-in exceptions. The built-in exception has two types: checked and unchecked exceptions.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>Checked exceptions<\/td><td>Unchecked exceptions<\/td><\/tr><tr><td>This shows at compile time<\/td><td>This shows while executing the program<\/td><\/tr><tr><td>The compiler identifies this type of exception<\/td><td>Because the compiler doesn\u2019t identify this type of exception<\/td><\/tr><tr><td>It can be solved during compilation time<\/td><td>It cannot be identified during compilation time<\/td><\/tr><tr><td>Ex: IO Exception<\/td><td>Ex: Null pointer Exception<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>There are various types of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Exception_handling\" target=\"_blank\" rel=\"noreferrer noopener\">exception handling<\/a> that fall under checked and unchecked exceptions. Now let\u2019s see types under <strong>Unchecked Exception<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. Null pointer exception<\/strong><\/h2>\n\n\n\n<p>When you call a variable whose value is zero or null, you\u2019ll get a null pointer exception.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Below is a sample code<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nBelow is a sample code\n \nclass nullpointerexception\n{\n    public static void main()\n    {\n        String s = null;\n        System.out.println(s.length());\n    }\n}\n \n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>java. lang.NullPointerException<\/p>\n\n\n\n<p>The value of the above variable is null and hence we get a null pointer Exception<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Arithmetic Exception<\/strong><\/h2>\n\n\n\n<p>This type of error occurs when you attempt to run the wrong mathematical operation through code. Under exception Handling in Java, this error is the only one that overlaps with mathematics.<\/p>\n\n\n\n<p>Ex: Divide any number by zero&nbsp;<\/p>\n\n\n\n<p><strong>Below is a sample code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class ExceptionTest {\n \n  public static void main(String&#091;] args) {\n    try {\n        int divbyzero = 1\/0;\n    }\n    catch (ArithmeticException ex) {\n        ex.printStackTrace();\n        System.out.println (ERROR: Divide by zero\")\n \n<\/code><\/pre>\n\n\n\n<p>&nbsp;<strong>Output:<\/strong><\/p>\n\n\n\n<p>The above code is showing an arithmetic error.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Array Index Out of Bounds Exception<\/strong><\/h2>\n\n\n\n<p>Few of the Exception Handling In java deal with value. This error occurs when you process an array but call a value in the array which doesn\u2019t exist in the particular array<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/07\/03111926\/image.png\" alt=\"Exception Handling In java\" class=\"wp-image-171952\" width=\"275\" height=\"233\" \/><\/figure><\/div>\n\n\n\n<p><strong>Below is a sample code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \npublic class Example \n{ public void processArray()\n { List names = new ArrayList&lt;&gt;(); names.add(\"Eric\"); names.add(\"Sydney\"); \nreturn names. get(5); } }\n<\/code><\/pre>\n\n\n\n<p><strong>output:<\/strong><\/p>\n\n\n\n<p>ArrayIndexOutOfBoundsException<\/p>\n\n\n\n<p>The code gives you the above error because you are calling a value that doesn\u2019t exist.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. Runtime exception<\/strong><\/h2>\n\n\n\n<p>If any kind of exception arises during the execution of the program, it is a Runtime exception<\/p>\n\n\n\n<p><strong>Below is a sample code<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \npublic class Runtime_Excp_Ex { public void Demo_Runtime_Exception () { throw new Running_Exception(); } public static void main(String&#091;] args) { try { new Running_Exception().Demo_Runtime_Exception(); } catch(Exception excpn) { System.out.println(excpn.getClass().getName()); } } } class Running_Exception extends RuntimeException { public Running_Exception() { super(); } public void Demo_Runtime_Exception() { throw new Running_Exception(); }\n\n\n<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Wronk0Ao2oq1k_TKw-vOvehdrHCda_qiIMXIpUYDcFmFtn1JOgc1O2ep11QASM-U_a6ETEOJ70gQ6144zVJWoJ2p0VIMwxGAiilCJqVBFEAYQ9VX8bVUOjuxU8PSWAyRunYt8jT_EL1Dk2QsKOY3VU8\" width=\"197\" height=\"68\"><\/p>\n\n\n\n<p>The error shows during execution only<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. Illegal thread state exception<\/strong><\/h2>\n\n\n\n<p>&nbsp;This Exception Handling In java is quite unique as it attempts to show the status of the program. Suppose you attempt to start a thread that is already in running mode and executing its functions It gives you an exception called the illegal thread state exception.<\/p>\n\n\n\n<p><strong>Below is a Sample code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyThread extends Thread \/\/ Creating MyThread class that is extending the Thread class\n{\n    public void run() \n    {\n\t  for (int i = 0; i &lt; 3 ; i++)\n\t  {\t\n\t\tSystem.out.println(i);\t\n\t  }\n    }\n\n    public static void main(String args&#091;])\n    {\n        \/\/In main() method, creating a thread object  \n        MyThread th = new MyThread();\n\n        Stating the thread\n        th.start();\n        \n        System.out.println(\"Alive is Awesome\");\n\n        starting the thread again when it's already running, causing an IllegalThreadStateException.\n\n       th.start();\n<\/code><\/pre>\n\n\n\n<p><strong>output:<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Illegal thread state exception<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Checked Exceptions<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. IO Exception<\/strong><\/h2>\n\n\n\n<p>This kind of exception occurs while reading file directories and streams. Suppose you are calling a file \u2018input.txt, which has not been declared, then such an exception. Under Exception Handling in Java, this exception deals with name of the files and directories.<\/p>\n\n\n\n<p>Sample code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.io.*;\n\/\/ Example of FileNotFoundException\nclass Test{\npublic static void main(String&#091;] args) {\n\/\/ Creating an instance of FileReader class\nFileReader fileReader = new FileReader(\"input.txt\");\nSystem.out.println(fileReader.read());\nfileReader.close();\n}\n}\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>Main.java:7: error: unreported exception FileNotFoundException must be caught or declared to be thrown<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;FileReader fileReader = new FileReader(&#8220;input.txt&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<\/p>\n\n\n\n<p>Main.java:8: error: unreported exception IOException must be caught or declared to be thrown<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(fileReader.read());<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<\/p>\n\n\n\n<p>Main.java:9: error: unreported exception IOException must be caught or declared to be thrown<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;fileReader.close();<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<\/p>\n\n\n\n<p>It is showing IO Exception<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Class not found Exception<\/h2>\n\n\n\n<p>This Exception occurs when you are calling a class that does not exist.<\/p>\n\n\n\n<p>Sample code:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Java Program to Handle Checked Exception\n \nImporting required classes\nimport java.io.*;\n \n\/\/ Main class\nclass GFG {\n \n    \/\/ Main driver method\n    public static void main(String&#091;] args)\n    {\n        \/\/ Calling the class gfg, which is not present in the\n        \/\/ current class temp instance of calling class\n        Class temp = Class.forName(\"gfg\");\n \n        It will throw ClassNotFoundException\n    }\n}\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>Here we are calling it&nbsp; \u2018gfg\u2019 instead of \u2018GFG\u2019.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/ahz9jzKJIOYUwjKz8C2iYIK-ULbdQRaC44RKC-nZLu1NHZt6r9zKh1cjSMZdxccZ8oDjxy73FNbjD3phfOuCnigkc0ZPhgezi5nzHAOWruEd5ZwC9z-0RNGu6nWg3eO9nRoq-O7qIqVetFiBq655i9w\" alt=\"\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. File not Found Exception<\/strong><\/h2>\n\n\n\n<p>This Exception arises when you try to read data from a particular file under a particular class, but such a file doesn&#8217;t exist under the constructor, and this error is shown. Under Exception Handling In Java, this shows how careful you must be whenever you call a class.<\/p>\n\n\n\n<p>Sample code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.io.File;\nimport java.io.FileReader;\n\npublic class FilenotFound_Demo {\n\n   public static void main(String args&#091;]) {      \n      File file = new File(\"E:\/\/file.txt\");\n      FileReader fr = new FileReader(file);    \n   }\n}\n<\/code><\/pre>\n\n\n\n<p>output:<\/p>\n\n\n\n<p>C:\\&gt;javac FilenotFound_Demo.java<\/p>\n\n\n\n<p>FilenotFound_Demo.java:8: error: unreported exception FileNotFoundException must be caught or declared to be thrown<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;FileReader fr = new FileReader(file);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<\/p>\n\n\n\n<p>1 error<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Top 10 Java Course in India | ReviewsReporter\" width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/qikO5mi4Ows?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">4. no such method Exception<\/h2>\n\n\n\n<p>This Exception arises when we try to access elements from a set or Hash table that doesn\u2019t have any elements.<\/p>\n\n\n\n<p><strong>Sample code:<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Java program to demonstrate NoSuchElementException\npublic class NoSuchElementException_Demo {\n \n    public static void main(String&#091;] args)\n    {\n \n        Set exampleleSet = new HashSet();\n \n        Hashtable exampleTable = new Hashtable();\n \n        exampleleSet.iterator().next();\n          \/\/accessing Set\n       \n        exampleTable.elements().nextElement();\n          \/\/accessing Hashtable\n       \n          \/\/ This throws a NoSuchElementException as there are\n        \/\/ no elements in Set and HashTable and we are\n        \/\/ trying to access elements\n    }\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Output:&nbsp;<\/strong><\/p>\n\n\n\n<p>no such method Exception<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Henry Harvin Java course<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table alignwide\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Batch<\/td><td class=\"has-text-align-center\" data-align=\"center\">Mode<\/td><td class=\"has-text-align-center\" data-align=\"center\">Price<\/td><td class=\"has-text-align-center\" data-align=\"center\">To enroll<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">starts Every week<\/td><td class=\"has-text-align-center\" data-align=\"center\">online<\/td><td class=\"has-text-align-center\" data-align=\"center\">65000<\/td><td class=\"has-text-align-center\" data-align=\"center\"><a href=\"https:\/\/www.henryharvin.com\/java-full-stack-developer-course\" target=\"_blank\" rel=\"noreferrer noopener\">Enroll here<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Henry Harvin?<\/strong><\/h3>\n\n\n\n<p>Video URL: <span style=\"padding: 0;margin: 0;margin-left: 5px\"><\/span><\/p>\n\n\n\n<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/TZVc0mdOHbw\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen=\"\"><\/iframe>\n\n\n\n<p>1.&nbsp;Recognized for its quality by the top-most publishers like Hindustan Times, Business World, Statesman, etc.,<\/p>\n\n\n\n<p>2.&nbsp;Affiliated and accredited by AAEFL, AAPC, Asian International University, MSME, Startup India, and more.<\/p>\n\n\n\n<p>3.&nbsp;Therefore Awarded as the best corporate training program by Entrepreneur Education Innovation.<\/p>\n\n\n\n<p>4.&nbsp;Additionally, the learners gain access to job support for its excellent networking.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Recommended Reads<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.henryharvin.com\/blog\/pattern-programs-in-java-for-printing-numbers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Java program for printing numbers<\/a><\/li><li><a href=\"https:\/\/www.henryharvin.com\/blog\/javascript-books\/\" target=\"_blank\" rel=\"noreferrer noopener\">Java script books for 2023<\/a><\/li><li><a href=\"https:\/\/www.henryharvin.com\/blog\/oops-concepts-in-java-with-examples\/\" target=\"_blank\" rel=\"noreferrer noopener\">OOPs concepts in Java with examples<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion:<\/strong><\/h3>\n\n\n\n<p>Java is a powerful programming language this is the base of many software we use in our daily life. Accordingly, Exception Handling In java which we discussed in this blog helps a programmer who finds himself\/herself with a lot of errors. As a final point knowing these first handed will be easy to Identify, rectify and further move on to the next program.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">FAQs<\/h3>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1688379188177\"><strong class=\"schema-faq-question\">1. <strong>What is an Exception?<\/strong><\/strong> <p class=\"schema-faq-answer\">The exception is an error that arises in Java programming. For this reason, It can also be said as it disrupts the normal flow of programming<br \/><\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1688379376341\"><strong class=\"schema-faq-question\">2. <strong>Why checked exceptions are also called run-time exceptions?<\/strong><\/strong> <p class=\"schema-faq-answer\">The error under this exception arises when the program is executed before we wouldn\u2019t be able to identify it.<br \/><\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1688379431736\"><strong class=\"schema-faq-question\">3. <strong>Give an example of an Arithmetic Exception?<\/strong><\/strong> <p class=\"schema-faq-answer\">When you want to multiply a number by n number of times Ex: 25 multiplied 8 times you will get your answer. However, if you try to know the 25 multiplied by 45 in the square root without mentioning any number in the square root then an arithmetic error arises.<br \/>Eg: 25()x45<br \/><\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>To begin with, Exception Handling in Java deals with error this occurs when the program is executed. It can also&#8230;<\/p>\n","protected":false},"author":1002,"featured_media":179232,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","two_page_speed":[],"footnotes":""},"categories":[18655],"tags":[19995,19996],"class_list":["post-171878","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-exception","tag-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Exception Handling in Java Types and Examples<\/title>\n<meta name=\"description\" content=\"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exception Handling in Java Types and Examples\" \/>\n<meta property=\"og:description\" content=\"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Henry Harvin Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-11T06:23:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-23T10:48:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"1067\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sathya Pramodh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@henryharvin_in\" \/>\n<meta name=\"twitter:site\" content=\"@henryharvin_in\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sathya Pramodh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/\"},\"author\":{\"name\":\"Sathya Pramodh\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/0338ef7a71fab808d83a442daa5d2c55\"},\"headline\":\"Exception Handling in Java Types and Examples\",\"datePublished\":\"2023-08-11T06:23:51+00:00\",\"dateModified\":\"2024-12-23T10:48:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/\"},\"wordCount\":1150,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\"},\"image\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/11123745\\\/pasted-image-0-2023-08-11T180721.245.png\",\"keywords\":[\"exception\",\"java\"],\"articleSection\":[\"Java Blogs | Learn More About Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/\",\"name\":\"Exception Handling in Java Types and Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/11123745\\\/pasted-image-0-2023-08-11T180721.245.png\",\"datePublished\":\"2023-08-11T06:23:51+00:00\",\"dateModified\":\"2024-12-23T10:48:01+00:00\",\"description\":\"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379188177\"},{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379376341\"},{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379431736\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/11123745\\\/pasted-image-0-2023-08-11T180721.245.png\",\"contentUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/11123745\\\/pasted-image-0-2023-08-11T180721.245.png\",\"width\":1600,\"height\":1067,\"caption\":\"Exception Handling In java\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Blogs | Learn More About Java\",\"item\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/category\\\/java\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Exception Handling in Java Types and Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/\",\"name\":\"Henry Harvin Blog\",\"description\":\"Latest Online Courses &amp; Certification Blogs\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\",\"name\":\"George L V\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"url\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"contentUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"width\":445,\"height\":130,\"caption\":\"George L V\"},\"logo\":{\"@id\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\"},\"description\":\"George is an expert communicator. As a coordinator, senior language instructor, center head and a content writer the basic requirement at the DNA level was the same \u2013 effective communication. He discovered early in life that quality of communication makes the difference between great results and mediocre outcomes. And thus, he developed his first forte: focus on the listener and tailor the message accordingly. As he progressed in his career, he realized that the most compelling stories communicate through multi-sensory messaging - a powerful combination of visual, verbal, and intuitive content.\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/0338ef7a71fab808d83a442daa5d2c55\",\"name\":\"Sathya Pramodh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g\",\"caption\":\"Sathya Pramodh\"},\"description\":\"I completed my education in English Literature this in turn aided in development of writing skills, to leverage my strengths and build my career. I began my journey as a content writer.\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/author\\\/sathyapramodh16gmail-com\\\/\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379188177\",\"position\":1,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379188177\",\"name\":\"1. What is an Exception?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The exception is an error that arises in Java programming. For this reason, It can also be said as it disrupts the normal flow of programming<br \\\/>\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379376341\",\"position\":2,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379376341\",\"name\":\"2. Why checked exceptions are also called run-time exceptions?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The error under this exception arises when the program is executed before we wouldn\u2019t be able to identify it.<br \\\/>\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379431736\",\"position\":3,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/exception-handling-in-java\\\/#faq-question-1688379431736\",\"name\":\"3. Give an example of an Arithmetic Exception?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"When you want to multiply a number by n number of times Ex: 25 multiplied 8 times you will get your answer. However, if you try to know the 25 multiplied by 45 in the square root without mentioning any number in the square root then an arithmetic error arises.<br \\\/>Eg: 25()x45<br \\\/>\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exception Handling in Java Types and Examples","description":"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Exception Handling in Java Types and Examples","og_description":"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.","og_url":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/","og_site_name":"Henry Harvin Blog","article_published_time":"2023-08-11T06:23:51+00:00","article_modified_time":"2024-12-23T10:48:01+00:00","og_image":[{"width":1600,"height":1067,"url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png","type":"image\/png"}],"author":"Sathya Pramodh","twitter_card":"summary_large_image","twitter_creator":"@henryharvin_in","twitter_site":"@henryharvin_in","twitter_misc":{"Written by":"Sathya Pramodh","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#article","isPartOf":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/"},"author":{"name":"Sathya Pramodh","@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/0338ef7a71fab808d83a442daa5d2c55"},"headline":"Exception Handling in Java Types and Examples","datePublished":"2023-08-11T06:23:51+00:00","dateModified":"2024-12-23T10:48:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/"},"wordCount":1150,"commentCount":0,"publisher":{"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094"},"image":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png","keywords":["exception","java"],"articleSection":["Java Blogs | Learn More About Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/","url":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/","name":"Exception Handling in Java Types and Examples","isPartOf":{"@id":"https:\/\/www.henryharvin.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#primaryimage"},"image":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png","datePublished":"2023-08-11T06:23:51+00:00","dateModified":"2024-12-23T10:48:01+00:00","description":"Exception Handling in java with types and Examples it includes output. Helpful if known before handed as it avoids errors.","breadcrumb":{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379188177"},{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379376341"},{"@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379431736"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#primaryimage","url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png","contentUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/08\/11123745\/pasted-image-0-2023-08-11T180721.245.png","width":1600,"height":1067,"caption":"Exception Handling In java"},{"@type":"BreadcrumbList","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.henryharvin.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Java Blogs | Learn More About Java","item":"https:\/\/www.henryharvin.com\/blog\/category\/java\/"},{"@type":"ListItem","position":3,"name":"Exception Handling in Java Types and Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.henryharvin.com\/blog\/#website","url":"https:\/\/www.henryharvin.com\/blog\/","name":"Henry Harvin Blog","description":"Latest Online Courses &amp; Certification Blogs","publisher":{"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.henryharvin.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094","name":"George L V","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","contentUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","width":445,"height":130,"caption":"George L V"},"logo":{"@id":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png"},"description":"George is an expert communicator. As a coordinator, senior language instructor, center head and a content writer the basic requirement at the DNA level was the same \u2013 effective communication. He discovered early in life that quality of communication makes the difference between great results and mediocre outcomes. And thus, he developed his first forte: focus on the listener and tailor the message accordingly. As he progressed in his career, he realized that the most compelling stories communicate through multi-sensory messaging - a powerful combination of visual, verbal, and intuitive content."},{"@type":"Person","@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/0338ef7a71fab808d83a442daa5d2c55","name":"Sathya Pramodh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f9a7abd2cdc22073565e885fa1e4608862d6d23e6baaff19e79a8913f52932d0?s=96&d=wp_user_avatar&r=g","caption":"Sathya Pramodh"},"description":"I completed my education in English Literature this in turn aided in development of writing skills, to leverage my strengths and build my career. I began my journey as a content writer.","url":"https:\/\/www.henryharvin.com\/blog\/author\/sathyapramodh16gmail-com\/"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379188177","position":1,"url":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379188177","name":"1. What is an Exception?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The exception is an error that arises in Java programming. For this reason, It can also be said as it disrupts the normal flow of programming<br \/>","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379376341","position":2,"url":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379376341","name":"2. Why checked exceptions are also called run-time exceptions?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The error under this exception arises when the program is executed before we wouldn\u2019t be able to identify it.<br \/>","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379431736","position":3,"url":"https:\/\/www.henryharvin.com\/blog\/exception-handling-in-java\/#faq-question-1688379431736","name":"3. Give an example of an Arithmetic Exception?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"When you want to multiply a number by n number of times Ex: 25 multiplied 8 times you will get your answer. However, if you try to know the 25 multiplied by 45 in the square root without mentioning any number in the square root then an arithmetic error arises.<br \/>Eg: 25()x45<br \/>","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"views":995,"_links":{"self":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts\/171878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/users\/1002"}],"replies":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/comments?post=171878"}],"version-history":[{"count":1,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts\/171878\/revisions"}],"predecessor-version":[{"id":228732,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts\/171878\/revisions\/228732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/media\/179232"}],"wp:attachment":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/media?parent=171878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/categories?post=171878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/tags?post=171878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}