title: Throwing exceptions syntax java
body: <p>I'm having a hard time figuring out how to throw and catch exceptions.<br>
  I Think I have the general syntax right, at least according to the book that I'm using, but I keep getting errors.  </p>
  
  <p>Can anyone help me out with the syntax? </p>
  
  <pre><code>public Movie( String title, int yearReleased, double rating){
      try{
          if (rating &lt; 4.1 &amp;&amp; rating &gt;= 0.0)
              this.rating = rating; 
          else
              throw new IllegalArgumentException;
      catch (IllegalArgumentException e){
          System.out.println("This rating is invalid");
      }
  }
  </code></pre>