title: Is disabling Checked Exceptions in Java possible?
body: <p>I was reading an article about checked and unchecked Exceptions in Java and found this article/link:
  <a href="https://projectlombok.org/disableCheckedExceptions.html" rel="noreferrer">https://projectlombok.org/disableCheckedExceptions.html</a></p>
  
  <p>According to the article it's just a hack developed for javac.</p>
  
  <p>Consider the code snippet below:</p>
  
  <pre><code>import java.io.*;
  class Example
  {  
      public static void main(String args[]) throws IOException
      {
          FileInputStream fis = null;
          fis = new FileInputStream("myfile.txt"); 
          int k; 
  
          while(( k = fis.read() ) != -1) 
          { 
              System.out.print((char)k); 
          } 
          fis.close();    
      }
  }
  </code></pre>
  
  <p>Here I have to write  <code>public static void main(String args[]) throws IOException</code>
  because I am trying to open a file. Here "throws" clause is a must. Without it I will get an error. What if I am sure about the Existance of the file I am opening. i.e.myfile.txt in the mentioned location. At some point one can feel that few Checked Exceptions are not required for the code.</p>
  
  <p><strong>Is there any facility provided by Java to disable checked Exceptions according to the need?</strong></p>
  
  <p>Even after doing so much research I could not find a proper answer for it.</p>