![]() |
JBridge: Certification Question Of The Day |
| JBridge Home >> Certification Questions >> Today's Question | Monday 5th May 2003 |
|
Which of the following method signatures represent a correct way of overriding the doGet method in HttpServlet? (2 correct answers) A void doGet(HttpServletRequest
request, HttpServletResponse response) throws HttpServletException,
IOException B public void
doGet(HttpServletRequest request, HttpServletResponse response) throws
IOException C protected void
doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException D protected boolean
doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException E public
boolean doGet(HttpServletRequest request, HttpServletResponse response)
throws HttpServletException, IOException
F protected void doGet(HttpServletRequest req,
HttpSession resp) throws ServletException, IOException Page down for the answer... The AnswerB & C are the correct answers. Each throws only one of the
two exception types present in the superclass doGet. But that’s OK – an
overriding method can throw fewer exceptions than its parent.
|
EMail: dbridgewater@jbridge.co.uk
Phone: +44 (0)1943 877414
Fax: +44 (0)1943 877414
Mail: David
Bridgewater, Willow Dene, Bradford Road, Menston, Ilkley, West Yorkshire, LS29
6ED, UK
Copyright © 2003 David Bridgewater. All rights reserved.