Question ID: 996171458475 Which of the following classes provide methods to write messages to a log file ? 2 correct answers. 1.) GenericServlet 2.) HttpServletRequest 3.) ServletContext 4.) Only GenericServlet I marked 1 and 4. It said I was wrong. Correct answer 1 and 3. Isn't ServletContext an <<interface>> like HttpServletRequest is an interface, not a CLASS !!
1.) GenericServlet 3.) ServletContext 3--is correct. ServletContext interface is implemented by the container,this means that there is a class(container class)which implements all the methods defined in the ServletContext interface. including 'log' methods. 1-- is also correct, GS class only implements the log methods of SC not the interface. To clear it a bit further,just think how we are able to use other methods defined in ServletContext interface (i.e getRealPath,getContext,getResource) answer is the container implements SC(container class). 'no worries' Amer [ May 26, 2003: Message edited by: Amer Khan ]
<i>Dare to dream - everything that exists today,was once a figment of someone's imagination, nobody says tomorrow can't be a figment of your today.</i>
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad: