I practised the two scjp6 MasterExam's that come on cd with the K&B 6 book. At several questions I had the idea some answers were a bit ambiguous. Did anybody else had problems with this? It might be because English is not my mother language, although it's not too bad either. Or perhaps it's just the way I look at the questions. Maybe, when I see code, I should seek for traps, and when I see questions like 'what is true', I should go for the answers that are 'generally' true. Maybe somebody has some tips for me?
Here are some examples I had problems with, there were some more:
A: When an object is serialized, if it has references to other objects, those objects must be serializable. [REF: question 30 exam B]
B: The . character searches for letters. [REF: exam A]
C: is-a relationships always rely on
polymorphism.
D: When using the
java command, only files ending in .class can be executed [REF: question 66 exam B]
E: If your class implements Comparable but you don't explicitly override Comparable's method, collections will be sorted in natural order. [REF: question 54 exam B]
A is supposed to be true, but I didn't check it, because of transient variables.
B is supposed to be false, but I thought it was true. Hey, I know it searches more than letters only.
C should be true, I don't quite understand the sentence (has to do with my English I guess).
D is true. I thought, what about .jar files? Ok .. they consist of .class files that are executed...
E is not true. But I was thinking, what if I extend Integer. My SubInteger class implements Comparable, right? But I didn't explicitly override compare().
At another question, I had to check what was NOT possible. Here, I also had to check 'The code does not compile' and 'An error occurs at runtime'. Ok, maybe I should have checked the former, but how can one know that an error cannot occur at runtime? (what about OutOfMemoryError?).