title: Android: change array value from other class
body: <p>i've two class.
  the first class is</p>
  
  <pre><code>public class A{
  
      private static int[] x = {0,0,0,0};
      private static int justX = 0;
  
      public A(){}
  
      public static int[] getX(){return x;}
      public static int getJustX(){ return justX;}
  }
  </code></pre>
  
  <p>and the second class is</p>
  
  <pre><code>public class B extends . . .{
      private int[] x;
      private justX;
  
      public B(){
          x = A.getX(); 
          justX = A.getJustX();
          Log.d("X: ", Arrays.toString(x)); //X: {0,0,0,0}
          Log.d("JUST X: ", String.value(justX)); //JUST X: 0;
      }
  
      private void onTouch(){
          x[0] = 1;
          x[1] = 1;
          x[2] = 1;
          x[3] = 1;
          justX = 1;
  
          Log.d("X: ",Arrays.toString(A.getX())); //X: {1,1,1,1}
          Log.d("JUST X: ", String.value(A.getJustX())); //JUST X: 0;
      }
  }
  </code></pre>
  
  <p>array variable from class A changed but integer variable has not changed, Why did it happen?</p>