The following is question #58 from Marcus Green's 1.2 Mock Exam No. 1.
(Note that two
separate files are illustrated in the code.)
SOURCE:
http://www.jchq.net/mockexams/exam1.htm The answer is 4, with the explanation, "Using the package statement has an effect similar to placing a source file into a different directory. Because the files are in different packages they cannot see each other..."
I'm fine with the answer (4), but I'm questioning the justification provided: "Using the package statement has an effect
similar to placing a source file into a different directory." Since these files are each supposed to be in their own package, aren't they
required to be in different directories?
To me, the "similar to" wording would be applicable if both files were in a directory called "Class1," and the Base file
didn't declare a package at all. But as the question reads, the problem here is more than just package declaration.
Am I reading too much into this, or am I missing something?
[ September 30, 2004: Message edited by: marc weber ]
(fixed for width)
[ September 30, 2004: Message edited by: Barry Gaunt ]