<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dinushkas on Medium]]></title>
        <description><![CDATA[Stories by Dinushkas on Medium]]></description>
        <link>https://medium.com/@dinushkas443?source=rss-19533f9888c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*s44pmmpE0UIUdgc_</url>
            <title>Stories by Dinushkas on Medium</title>
            <link>https://medium.com/@dinushkas443?source=rss-19533f9888c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:46:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dinushkas443/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exceptions in JAVA]]></title>
            <link>https://medium.com/@dinushkas443/exceptions-in-java-3ddf4e902196?source=rss-19533f9888c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ddf4e902196</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Dinushkas]]></dc:creator>
            <pubDate>Thu, 24 Feb 2022 03:41:20 GMT</pubDate>
            <atom:updated>2022-02-24T03:41:20.102Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>What is “ <strong>Error </strong>“ &amp; “ <strong>Exception</strong>“?</li></ul><p>Let me briefly explain what&#39;s “Error” and what&#39;s “Exception” first .Here&#39;s little Fun-fact about error and exception :D</p><p>-&gt; Both error and exceptions are sub-classes of <strong>Throwable class</strong>.</p><p><strong>Exceptions </strong>is problem that occurs during the execution of the program. Here some reasons why exceptions occurs .</p><ol><li>A user may have input invalid data.</li><li>JVM maybe runout of memory.</li><li>File not found.</li></ol><p>Exceptions need to be handled otherwise Exceptions might lead to system failure. Exceptions can be occur during <strong>run-time</strong> or <strong>compile-time. Exceptions</strong> either can be Checked or Unchecked.</p><p>Check out this below code snippet :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*dueTV_M5b9LquhDSFQHgoA.png" /></figure><p>so after compiling the above code I get below output.This occurs because im trying to access a 10th index of the size of an array three.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szVa3aMfuTr7d6tDO3Ezag.png" /></figure><p>In here ill use a try-catch block to avoid the above situation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*mGpRRcEOcRo_GOZfGgDCiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*bauZkC_ygNTBTs9IGooMaw.png" /></figure><p><strong>try block </strong>is the block of code where exception occur. It allows you to define a block of code to be tested for errors while it is being executed.</p><p><strong>catch block </strong>it allows you to define a block of code to be executed, if an error occurs in the try block.</p><p><strong>Error </strong>occurs in the run-time and it occurs when illegal operation operation performed by the user and it may cause abnormal working of the program .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ddf4e902196" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>