• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt about mock exam question  RSS feed

 
P. Jain
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was studying from javabeat mock exam and got confused by a question.

17) Assuming the following content within the definition of web.xml,
<init-param>
<param-name>MovieName</param-name>
<param-value>Lord of the Rings</param-value>
</init-param>

which of the following can be used to retrive the value of the parameter
'MovieName'?

a. ServletContext.getParameter(�)
b. GenericServlet.getInitParameter(�)
c. Servlet.getInitParameter(�)
d. ServletConfig.getInitParameter()

The answer given is b but i think the answer should be d.

can anyone tell me whether i am right or wrong??
 
Jan Sterk
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b is right, check the api docs
d is missing the dots within ()
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Prince Jain",
Please check your private messages regarding an important administrative matter.
-Ben
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!