File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not happy about mock question...

 
Mark Uppeteer
Ranch Hand
Posts: 159
C++ Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

 
Lester Burnham
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 159
C++ Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D & F are the answers!
 
Roel De Nijs
Sheriff
Posts: 9180
77
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roel De Nijs
Sheriff
Posts: 9180
77
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic