 <p>Why not just use the array you've created?</p> <pre><code> For(int i = 0; i&lt; sL.length; i++){ String wavFileName = sl[i] + ".wav"; // do whatever you need to do here } </code></pre> <p>For on demand (press a button get a specific sound) then Jeroen's idea of using a map will work.</p>