I'm not sure whether this kind of thing appears on the actual exam, but I was a bit concerned about some of the questions in this book from Osborne Cert. Press. In several sample questions line numbering starts at 1, but there is no class definition etc..
In these cases I would say that compilation fails, since in other places, code snippets seem to start at some arbitrary number (which I assumed to mean that the necessary definitions are simply not shown). Is this an oversight in the book, or is it possible that on the actual exam, a code snippet can start at line 1, jump straight into code, and still compile?