title: Error in converting String to Date in Java
body: <pre><code>DateFormat d1;
  d1 = new SimpleDateFormat("dd-MMMM-yyyy");
  
  public String duedate = "20-April.2019";
  Date du =  d1.parse(duedate);
  </code></pre>
  
  <p>The Error I keep getting is: </p>
  
  <blockquote>
    <p>Default constructor cannot handle exception type ParseException thrown by implicit super constructor. Must define an explicit 
     constructor</p>
  </blockquote>