ArrayRef.java


Below is the syntax highlighted version of ArrayRef.java.


/************************************************
 * What number does this program output?
 * Paste the code into the Visualizer and Trace.
 ************************************************/
public class ArrayRef {
   public static void main(String[] args) {
        
      int[] a = new int[4];
      int[] b = a;
      a[3] = 100;
      System.out.println(b[3]);
   }
}