# Java: Array Quiz 3

Name __________________________________

Assume the following:

       String[] weekdays = {"Mon", "Tue", "Wed", "Thu", "Fri"};
       String[] b = new String[99];
       String[] c = null;

1. _____________ Value of `weekdays.length` ?
2. _____________ Value of `b.length` ?
3. _____________ Value of `b[0]` ? Write "illegal" if this is illegal.
4. _____________ Value of `b[100]` ? Write "illegal" if this is illegal.
5. _____________ Value of `c[0]` ? Write "illegal" if this is illegal.
6. _____________ Value of n after:

           int n = 0;
           for (int i=0; i<weekdays.length; i++) {
               if (weekdays[i].compareTo("M") > 0)) {
                   n++;
               }
           }

7. _____________ Value of s after

           c = weekdays;
           String s = c[1];

8. _____________ Value of s after

           String s;
           c = weekdays;
           for (int i=0; i<weekdays.length; i++) {
               c[i] = weekdays[i] + "day";
           }
           s = weekdays[2];