title: How to throw an IllegalArgumentException when an array is null or empty?
body: <pre class="lang-java prettyprint-override"><code>    /**
       * This constructor accepts an array of points as input. Copy the points into the array points[]. 
       * 
       * @param  pts  input array of points 
       * @throws IllegalArgumentException if pts == null or pts.length == 0.
       */
      protected AbstractSorter(Point[] pts) throws IllegalArgumentException
      {
          try{
              for(int i = 0; i &lt; pts.length; i++)
              {
                  points[i] = pts[i];
              }
          }
          catch()
          {
  
          }
      }
  </code></pre>
  
  <p>I know this should be really simple, but how would I throw this exception with those conditions?</p>