This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Not happy about mock question... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Not happy about mock question..." Watch "Not happy about mock question..." New topic
Author

Not happy about mock question...

Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

Yesterday I a mock test and ran into this question...

Mock question
Head first Servlets & JSP p212

Which calls provide information about initialization parameters that are applicable to an entire web application? (Choose all that apply.)
A. ServletConfig.getInitParameters()
B. ServletContext.getInitParameters()
C. ServletConfig.getInitParameterNames()
D. ServletContext.getInitParameterNames()
E. ServletConfig.getInitParameter(String)
F. ServletContext.getInitParameter(String)


I found this very confusing as this is the notation for a static method to me and these kind
of questions are typically the ones in which they would test you on your knowledge on that.

Initially I chose none of them, but later in the exam there was a similar notation in another question
and I changed my mind.

A collegae of mine mentioned correctly that I would never have this problem on the exam
since that would say 'choose 2' for example , but still mumble mumble...


I know where my towel is. (SCJP 5, OCPJWCD)
[Free Quiz Tips for a fun night with friends or family] Flash games
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
None of those methods are static (some don't even exist, but that's besides the point). What is meant by "ServletConfig.someMethod" is "assume you have an object of class ServletConfig, and then invoke someMethod on it".

The first clue is "applicable to an entire web application" - that rules out anything in ServletConfig (which is about specific servlets, not the entire web app). Of the remaining 3 methods, one doesn't exist - that's something you just have to know.

I'm no expert on these certifications, but I do believe that "(Choose all that apply.)" can happen in the actual exam.
Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

thanks for you reply Lester,


I know what is meant (and I know the answer too ), but I'm not happy with that notation.
We (my collegae and I) looked at mock exam questions in the K&B SCJP book and
found the same notation back there too now and then.
But it was never that eligible for misinterpretation as in this question...
I've never seen choose all that apply questions on the SCJP exam, only choose X
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

D & F are the answers!


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5218
    
  12

Lester Burnham wrote:I'm no expert on these certifications, but I do believe that "(Choose all that apply.)" can happen in the actual exam.

On the real exam(s) the number of answers you have to pick is always mentioned after the question ("Choose X") or if just one answer is the correct one, you'll have radio buttons instead of check boxes.
The mock exams are just to toughen you up for the real thing, they let you think just a little bit harder and take (almost) each answer into consideration.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5218
    
  12

Abimaran Kugathasan wrote:D & F are the answers!

If you would have taken the effort to read the original post completely, you would know he isn't interested in the correct answers (he has the book which mentions the correct answers). His concern is about the method signatures in the question.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not happy about mock question...