For loop java not executing properly? : <pre><code>//Declared here the atributes int id and int [9][5] array.

public String getPos(int id){
String res = "";
for(int i = 0; i &lt;9 ;i++ ){
    for(int j = 0; j&lt;5 ;j++){
        if(this.arr[i][j] == id)
              res = res + i + "," + j;  
    }
}
return res;
}
</code></pre>

<p>When I run getPos(1); the result is 8,2 but i want it to print 9,3. How i do that?</p>
