title: How to remove the smallest value in an Array?
body: <p>I'm trying to remove the smallest value in an array. I've iterated through the array to find the smallest value but when I try to remove it I get this:</p>
  
  <pre><code>    SportStacker.java:111: error: cannot find symbol
              times.remove(slowestTime);
                   ^
      symbol:   method remove(double)
      location: variable times of type double[]
      1 error
  </code></pre>
  
  <p>Which I understand that I'm telling it to remove a double[] when I just want to remove a double at a given index. How do I say I want to remove the double at the index which contains the smallest value? This is my code for my method.</p>
  
  <pre><code>     public double removeSlowestTime() {
  
       double slowestTime;
  
       for (int i = 0; i &lt; times.length; i++) {
          if (times[i] == 0) {
             continue;
          }
          else {
             if (slowestTime &lt; times[i]) {
                slowestTime = times[i];
              times.remove(slowestTime);
             }
          }
       }
       return slowestTime;
  </code></pre>