• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Charles Lyon's book mock exam 3 question 4

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On p. 60 of Charles Lyon's book,


3. Which abstract class can be extended to create a protocol independent servlet?
D. javax.servlet.GenericaServlet




4. What methods does the abstract class in Question 3 declare, which are not found in any superclasses or implemented interface?
A. public ServletConfig getConfig()
B. public ServletContext getServletContext()
C. public void init()
D. public void init (ServletConfig)
E. public String getInitParameter(String)



For question 4, I think it is refering to interfaces: Servlet and ServletConfig .
But I don't see any init() method or geConfig method declare in the above two interfaces.
I think the answer should be A and C, instead of C only as given in the book.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think the answer should be A and C, instead of C only as given in the book.


getServletConfig() comes from the Servlet interface and that is why it is not a correct answer to this question.
 
Himai Minh
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi , Frits. Thanks .
I thought the question is asking what methods are not defined in Servlet interface and ServletConfig interface.
I don't see any getConfig() method and init() methods defined in both interfaces.

I guess the book has a typo. Option A may have been "getServletConfig" instead.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I guess the book has a typo. Option A may have been "getServletConfig" instead.


or they did that on purpose... I even missed that
reply
    Bookmark Topic Watch Topic
  • New Topic