title: throw user defined exception in single statement in java
body: <p>Recently i attended an interview. one of the questions asked in technical interview round is "how can you throw a user defined exception using single statement".
  i wrote the code as</p>
  
  <pre><code>class MyException extends Exception{
  public MyExeption(String err){
  super(err);
  }
  class sample{
  public static void main(String a[]){
  throw new MyException("Error");
  }
  </code></pre>
  
  <p>but he said that i used 2 statements 1 for throw statement and other for super() statement.
  what is the answer. plese clear my doubt. thank you</p>