title: What exception to throw?
body: <p>I have a function which calculates the mean of a list passed as an argument. I would like to know which of Java exception should I throw when I try to compute the mean of a list of size 0.</p>
  
  <pre><code>public double mean (MyLinkedList&lt;? extends Number&gt; list)
  {
      if (list.isEmpty())
          throw new ????????; //If I am not mistaken Java has some defined exception for this case
  
      //code goes here
  }
  </code></pre>
  
  <p>Thanks.</p>