Hi all,
I'm new here, and this is my first post.
I have recently purchased Cameron McKenzie' book, the
SCJA Study Guide, Second Edition, and so far I am enjoying it :-)
Anyhow, I came across some example mockup exam questions found here:
http://freemockexamssunjava.scja.com/ExamScam/sunjavascjaexambooksstudyguidesmockexamsfreetutorials.jsp?link=mockexams I am not sure why the answer for [
Java and UML Modelling, Q11] is given as "C"?
For example:
-- QUESTION --
Choose the most correct answer.
Which of the following are not valid code snippets that could be placed to the right of the equals sign (note that it says (not)):
Alpha male =
new Alpha();
new Intern();
new Crew();
new Cam();
The result for question 11 I got back was:
Your answer: D Correct Answer: C
I chose "D" because it seemed to be the *most* wrong of all of them :-)
Reason being that both Alpha and Intern are abstract, so they cannot be instantiated, and Cam is an associate class of Crew, therefore not able to be instantiated, thus the most wrong :-). But after re-reading the question, I thought the question itslef looked wrong and should have read:
"Which of the following (are) valid code snippets..."
Rather than:
"Which of the following (are not) valid code snippets..."
However, I also notice that the Crew class does not implement (overide) the pass() method in Alpha, and I think the pass() method in alpha should be declared abstract too, otherwise my tests show that it won't compile otherwise.
So having said that, I'm not sure if any of the answers or the question is correct, and would like some clarification please :-)
Disclaimer: I am new to Java and UML, so go easy if I am completely wrong :-)
Thanks,
Chris
PS: How come there were some advanced Java questions in there? Will such advanced questions be on the exam and need to be studied too? :-)