 <p>Have this..<br/></p> <pre><code> for(i = 0; i &lt;= insertAmount; i++) { myTree.insert((int)Math.random()*1000000)+i; } </code></pre> <blockquote> <blockquote> <p>You must replace the +1 with i.</p> </blockquote> </blockquote> <p>hope it helps.</p>