title: Is there a way to copy Date object into another date Object without using a reference?
body: <p>I got a program that loads in raw data for charting and stores it in a class called <code>cRawGraph</code>..  It then formats this data and stores it in another class called <code>cFormatGraph</code>.  Is there a way to copy some of the date objects stored in <code>cRwGraph</code> to date objects stored in <code>cFormattedGraph</code> without using a reference? I looked at Oracle's documentation and did not see a constructor that would take in a date object or any methods data would accomplish this.</p>
  
  <p>code snippet:</p>
  
  <pre><code>do{
          d=rawData.mDate[i].getDay();
          da=rawData.mDate[i];
          datept=i;
          do{
            vol+=rawData.mVol[i];
            pt+=rawData.mPt[i];
            c++;
            i++;
            if (i&gt;=rawData.getSize())
                break;
            } while(d==rawData.mDate[i].getDay());
  
          // this IS NOT WORKING BECOUSE IT IS A REFRENCE AND RawData gets loaded with new dates,
          // Thus chnaging the value in mDate
          mDate[ii]=da;
  
        mVol[ii]=vol;
        mPt[ii]=pt/c;
        if (first)
        {
            smallest=biggest=pt/c;
            first=false;
        }
        else
        {
            double temp=pt/c;
            if (temp&lt;smallest)
                smallest=temp;
            if (temp&gt;biggest)
                biggest=temp;
  
        }
        ii++;
      } while(i&lt;rawData.getSize());  
  </code></pre>