True (Doh!)
But what still concerned me was that the exercise was to determine if the code would compile -- it compiled fine the way it was written, even though it gives an error at runtime. The answer to the exercise said that the array element had to start with 0. That, however, made no difference regarding the code's compiling, only the output -- with z set to -1, it would have run fine as well, with no errors. Unless I typed something wrong that made it compile fine, which maybe wasn't supposed to happen.
While I'm here, are you familiar with the codemagnets exercise in Chap3? I got it right, but my code was this:
the answer in the book had the index array code first, and the
string array code second. Does it matter? because like I said, the code compiled and ran the same either way.