Back to Top

Monday, 5 March 2012

JAVA: What is the superclass of Exception

java.lang.Throwable is the superclass of all the errors and exceptions in java.

Monday, 5 March 2012 by Anijit Sarkar · 5 Read more »

JAVA: Why Errors are Unchecked?

Error is unpredictable. It can occur at any point and recover is also quite impossible. So it is meaningless to declare such exception. That’s why, in java, error is unchecked.

by Anijit Sarkar · 5 Read more »

Thursday, 1 March 2012

J2EE: SERVLET: Class GenericServlet vs Class HttpServlet

·                    It is an abstract class which defines a generic and protocol independent servlet. Here, protocol independent means, by default, it doesn’t contain inherent support for any particular type of protocol, but it can be extended to provide implementation of any protocol.

·                    Class GenericServlet implements Interface Servlet and Interface ServletConfig  and it belongs to javax.servlet package.

·                    It offers simpler version of the servlet life cycle methods init() and destroy() and the methods of ServletConfig. That’s why, it makes writing a servlet easier.

·                    Here, the method service(ServletRequest req, ServletResponse res) is abstract, so the subclasses must override it. And this is also the reason why the GenericServlet is an abstract class.

Thursday, 1 March 2012 by Anijit Sarkar · 5 Read more »

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar
blog links Web Directory Academics Blogs