C++ Pointers to Pointers in Java
<p>I am a Java noob.  I have been able to grasp the concept of converting C/C++ pointers into Java references and this has gone fairly smoothly.</p>

<p>I hit a piece of code that has pointers to pointers (ie **ptr).  I need to dereference the pointer and change the value of the pointer it is pointing to (ie  *ptr = &newthing;)</p>

<p>This seems alot tougher in java.  Does anyone have any ideas on how to solve this issue?  Quick google search turned up nothing.</p>

<p>Here's a code example in C++.  I want to get something similar working in java but the ptr_to_ptr variable is a problem:</p>

<pre><code>struct _coord
{
   int x;
   int y;
   _coord * next_coordinate;
} coordinate_t;   

coordinate_t buffer[100];
coordinate_t * head;
coordinate_t ** ptr_to_ptr;

if (wednesday)
{
    ptr_to_ptr = &amp;head;
}
else
{
    ptr_to_ptr = &amp;head-&gt;next_coordinate;
}
*ptr_to_ptr = &amp;buffer[3];   // &lt;&lt;&lt;---- HOW DO YOU MAKE THIS WORK?
</code></pre>
