# Java: Array Quiz 2

Name __________________________________
Assume the following:

       int[] a = {25, -3, 6, 0, -3, 6};
       int[] b = new int[100];
       int[] c = null;

For all questions write "exception" if the code would produce a runtime exception (eg, NullPointerException or ArrayIndexOutOfBoundsException).

1. _____________ Value of `a.length` ?
2. _____________ Value of `b.length` ?
3. _____________ Value of `c.length` ?
4. _____________ Value of `a[10]` ?
5. _____________ Value of `b[10]` ?
6. _____________ Value of `c[10]` ?
7. _____________ How many objects were created by the declarations?
8. _____________ Value of n after

           c = b;
           b = a;
           int n = b.length;
           b = c;

9. _____________ Value of n after

           c = a;
           int n = c[1];

10. _____________ Value of n after

            int n;
            c = a;
            a = null;
            n = c[2];