Java method calls
<pre><code>import java.util.Date;
 public class Example {
  public static void main(String args[]) {

        Date d1 = new Date (99, 11, 31);
        Date d2 = new Date (99, 11, 31);

        method(d1, d2);
        System.out.println("d1 is " + d1+ "\nd2 is " + d2);
  }

  public static void method(Date d1, Date d2) {

        d2.setYear (100);
        d1 = d2;
  }

 }
</code></pre>

<p>The above code works fine. an output is </p>

<pre><code>d1 is Fri December 31 00:00:00 GMT 1999
d2 is Sun December 31 00:00:00 GMT 2000
</code></pre>

<p>But when I use wrapper class like Integer in a simialr method the change is not reflected.why?</p>
