title: java sound amplifier method
body: <p>I have an assignment for a class that has to do with implementing arraylists to work with sounds in java. I have tried to write the method but keep getting this error:</p>
  
  <blockquote>
    <p>java.lang.ArrayIndexOutOfBoundsException:-254 (in java.util.ArrayList)</p>
  </blockquote>
  
  <p>I am new to programming so I may have missed something quite simple. Anyway, here is my current method:</p>
  
  <pre><code>public void amplify (double amt) {
      for(Integer i : myData){
          myData.set(i, (int)(myData.get(i) * amt));
      }
  }
  </code></pre>
  
  <p>Thank you. Any help would be appreciated.</p>