public class MoreWeirdArrayStuff {
  /* returns a string representation of the
   * array */
  public static String arrToStr(int []A) {
    if (A.length == 0) {
      return "[]";
    }
    
    String s = "[" + A[0];
    
    for (int i = 1; i < A.length; i++) {
      s += ", " + A[i];
    }
    return s + "]";
  }
  
  public static void main(String []args) {
    int []A = new int[3];

    A[0] = 10;
    A[1] = 20;
    A[2] = 30;

    int x = 10;
    int y = x;

    System.out.println("x = " + x + ", y = " + y);
    x++;
    System.out.println("x = " + x + ", y = " + y);

    System.out.println("A = " + arrToStr(A));
    int []B = A;
    System.out.println("B = " + arrToStr(B));

    A[0]++;
    System.out.println("A = " + arrToStr(A));
    System.out.println("B = " + arrToStr(B));
  }
}
