title: Extending Exception/RunTimeException in java?
body: <p>I have below classes.</p>
  
  <pre><code>public class ValidationException extends RuntimeException {
  
  
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public class ValidationException extends Exception {
  
  
  }
  </code></pre>
  
  <p>I am confused as to when the custom exception should extend <code>RunTimeException</code> and when it has to extend <code>Exception</code>. Could you please explain me is there any disadvantage of extending <code>RunTimeException</code> directly?</p>
  
  <p>Thanks!</p>