answersLogoWhite

0

Because, the creators of the servlet framework cannot give all the functionality that you might want in your application.

So, if they make their class abstract, you the developer will be providing all the functionality you need and still stick to the framework standards defined by them.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the valid method for disabling a session?

In order to dispose of a session that is no longer needed, you can call the invalidate() method of the HttpServlet class. Assuming you have an instance of HttpServlet called 'session' you would do this: session.invalidate();


What is the super class of all servlets?

HttpServlet and GenericServlet


What is generic servlet class?

GenericServlet defines a generic, protocol-independent servlet whereas HttpServlet Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site that uses the Http Protocol.


What is the difference between abstract class and normal class?

Any class which has one or more abstract methods is called an abstract class. But in the normal class we can't have any abstract methods. We cannot create an object for the abstract classes. When we inherit the abstract class we should implement the abstract method which we inherit.


What is subclass of an abstract class called?

A Concrete class


What class is a new servlet usually inherited?

The servlet class created in web applications usually extend the javax.servlet.HttpServlet class. The HttpServlet extends the javax.servlet.GenericServlet. These classes contain the basic features that are required to run a web application.


What is an abstract class Write the syntax Declare a pure virtual function in an abstract class?

an abstract class is nothing but class which contains both abstract and concrete methods for abstract class we r nt create object Syntax for pure abstract class is abstract class x { public void abstract y(); public void abstract z(); public void abc() { }


What is the logical abstrect base class for a class called CricketPlayer?

A logical abstract base class for a class called CricketPlayer could be Batsman class or Bowlerclass.


Can abstract class have constructors?

A constructor of a class in invoked when a object of that class is created. As an abstract class can't have an object, so we can't create a constructor of the abstract class. But we can create a constructor of a concrete subclass of that abstract class and we have to pass the object of that concrete subclass to the abstract class.


How do you call an abstract class from main method?

An abstract class cannot have a constructor and hence you cannot invoke the constructor of the class - i.e., you can instantiate an abstract class and hence you cannot call the constructor of an abstract class.


True or false All methods in an abstract class must be abstract?

False. In fact, it is possible to have no abstract methods in an abstract class.


What happens if an abstract modifier is applied to class. Explain?

The classes which have one or more abstract methods are abstract. To declare a class as abstract, use the abstract keyword in front of the class keyword, before the class declaration. Abstract classes cannot be instantiated. Similarly the new keyword cannot be used to create an object of the abstract class. Remember that the constructors and static variables cannot be declared as abstract. Any subclass of an abstract class must either implement all of the abstract methods in the superclass or be itself declared abstract.