Hi Jorge,
First of all, a warm welcome to CodeRanch!
Jorge Rego wrote:Does the real exam have questions like this that leads to ambiguity?
Normally the exam questions are of high quality. I didn't encounter any ambiguous question. But it's always possible a (small) typo is made. When I took OCAJP7, I had to select an answer with a compiler error in it as correct answer, more info
here (I reported this question to the OCP team).
And of course there's always the spirit of a question. With your example I would never have selected F as correct answer, simply because I know a source file can have just 1 public class and 1 package statement (which must be the 1st one of the source code file, comments not included). So I assume both classes are in different class files and would have marked B and C as the correct answers.
This question is
testing you on packages and the proper import statement. Probably if the question was testing you about how many package statements and/or public classes are allowed in a source code file, the question would mention explicitly something like: "Given the source code file
Car.java containing the following code:".
Hope it helps!
Kind regards,
Roel