• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Not happy about mock question...

 
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
D & F are the answers!
 
Sheriff
Posts: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic