Keeping the address space the same in java
<p>I'm trying to keep my address the same, since I have a <code>JList</code> pointing towards <code>listAccts</code>. How do I make <code>ListAccts</code> have the same address space? Basically, how do I copy this object? </p>

<pre><code>public class BankEngine extends AbstractListModel {

/** holds the accounts inside the bank engine */
private ArrayList&lt;Account&gt; listAccts;
/** holds all the actions the user has done. */
private ArrayList&lt;Action&gt; actions;
/** holds old versions of the bank. */
private ArrayList&lt;ArrayList&lt;Account&gt;&gt; oldEngines;

/*****************************************************************
 * Constructor that creates a new BankEngine, the core of the project
 ******************************************************************/
public BankEngine() {
    listAccts = new ArrayList&lt;Account&gt;();
    // actions = new ArrayList&lt;Action&gt;();
    oldEngines = new ArrayList&lt;ArrayList&lt;Account&gt;&gt;();
    oldEngines.add(listAccts);
}
public void undo() {
    if (oldEngines.size() == 0) {

    } else {
        listAccts = oldEngines.get(oldEngines.size()-1); &lt;--- I want this to have the same listAccts pointer.

}
</code></pre>
