title: How can I change Integer value when it is an argument like change array's value?
body: <pre><code>public static void main(String[] args) {
      Integer i = new Integer(0);
      int[] arr = {1};
      p1(i);
      p2(arr);
      System.out.println(i);
      System.out.println(arr[0]);
  }
  
  
  public static void p1(Integer i) {
      i = 2;
  }
  
  public static void p2(int[] i) {
      i[0] = 2;
  }
  </code></pre>
  
  <p>//output: 0, 2</p>
  
  <p>How can I change the value of i like I change the value of arr? </p>