Can not sort out how the Array is updated
<p>Hi i have this code of work from some one, its working fine as intended and i come to the point that this particular code is updating the value of temp[][]. but i can not figure our exaxtly where the temp[i][j]=updated is working out.
as the method is not returning any thing, and there is no assigning to temp[][]. all i see is the update_table[][]=temp;</p>

<p>when i try to print the temp before the loop and after the loop there is change in the array.</p>

<pre><code>void var_init(String to_match_x,String to_match_y, String to_replace_x, String to_replace_y,String[][] temp)
{
    String t_match_x=to_match_x;
    String t_replace_x=to_replace_x;
    String t_match_y=to_match_y;
    String t_replace_y=to_replace_y;
    //String str=string;
    //add function to count variables find duplicates and assign values to them
    line();
    System.out.println("text to match:"+t_match_x);
    System.out.println("text to replace with:"+t_replace_x);
    System.out.println("text to match:"+t_match_y);
    System.out.println("text to replace with:"+t_replace_y);

    String[][] table_update=temp;
    line();

    System.out.println("starting fetching rules for updating variable");
    line();

    for(int i=0;i&lt;table_update.length;i++)
        for(int j=0;j&lt;table_update[0].length;j++)
            {
                 String replace_text=table_update[i][j];
                 System.out.println(replace_text);
                 String new_str;
                 new_str=replace_text.replaceAll("\\"+t_match_y,t_replace_y);         
                 new_str=new_str.replaceAll("\\"+t_match_x,t_replace_x);
                 table_update[i][j]=new_str;
                 System.out.println(table_update[i][j]);
                 line();

            }
}
</code></pre>