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"?
-- 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 :-)
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? :-)
You know, at the bottom of the page, where it says "Don't Click and Drag", if you do actually click and drag, it provides you to the answer to the question. The answer on that page is as follows:
Options a) b) and d) are not valid code snippets.
An instance of a class that is-an Alpha is being asked for, and only Crew fits this bill, making c) correct. Alpha is incorrect because abstract classes cannot be instantiated using the new keyword, nor can interfaces. Intern is an interface, so it can't be instantiated, but it also does not share an is-a relationship with the Alpha class, nor does the Cam class.
So, you can see from the answer that there's a typo in the question. I hadn't noticed that. I'll update the page.
You know, that exam has been up for like a year, and nobody has ever brought that to my attention. Kinda like letting me walk around with my zipper undone, and nobody telling me, how cruel.
Thanks for the heads up, and again, the answer to each question is hidden on the page, so when in doubt, compare against the answer. That should help clarify things.
As far as the 'advanced' questions go, I'm not too sure which ones you might be referring to. The free online tests at the site are actually designed to be very, very, very indicative of the types of questions on the exam. Most of the feedback I've received from my SCJA Books on the exam are that the questions in them, along with the ones on the site, are very much in line with the level of difficulty on the exam, which has always been the goal.
Feel free to message me through JavaRanch, or my site, if you have any specific questions. Or, if it's something everyone might benefit from, feel free to start a new thread. I'm in here regularly.
And don't be embarassed about being 'new to Java' or 'new to UML.' That's the whole point of attacking these certification exams - the help you learn the important concepts.
Kind regards, and thanks for checking out my free online SCJA exams!
Hi Cameron, thanks for the clarification, and I have some further questions about the UML diagram :-)
From what I have read so far, and seeing that both interfaces "Interpid" and "Intern" are abstract (and each interface method is abstract and public by default), should't their methods be in italics to represent abstract methods too?
I have tested it according to the UML diagram, and it does compile and run, but I am not so clear on the rules of overiding here. For example: If Alpha implements the pass() method, does that then mean that Crew is free or within its rights to not overide it?
Thanks again, Chris
posted 12 years ago
Oh, I almost forgot...
The advanced question was under the section for: [Java Based Server Client Technologies]
Choose the 2 most correct answers.
Which of the following two are associated with distributed EJBs? (Advanced Question)
ties stubs skeletons marshals
I can't recall coming across these things in your book so far, so they had me stumped when I got to them
Thanks again, Chris
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop