Java Infinite loop/calls
<p>Hi 
I bumped into this problem this morning (I've already found a work around) but I'm curious to why my code is not working as I wanted</p>

<pre><code>    public class classA

    //(1)
    public void function(GL10 gl){

             function(gl,useGLUtilsBool, useMipMapBool);
         }
    //(2)
         public void function(GL10 gl,boolean useGLUtils, boolean 
    useMipMap){
             generateTexture(gl, useGLUtils, useMipMap);
         }
    }

    @Override
    public class classB extends 
    classA{
    //(3)
         public void function(GL10 gl, boolean useGLUtils, boolean 
    useMipMap) {
             function(gl);
         }
    //(4)
    @Override    
     public void function(GL10 gl) {
             super.function(gl);

         }
</code></pre>

<p>Normally it should do (3)->(4)->(1)->(2)
but instead I get (3)->(4)->(1)->(3)->(4)->(1)...</p>

<p>what I don't get is why classA function(...) (1) would call (3) and not (2)</p>
