-
Junior Member
HttpServlet abstract class
1) HttpServlet doesn't have any Abstract methods but we can say that HttpServlet is an Abstract Class,How?
2) Could you tell me is there any classes of this type in both J2SE and J2EE?
-
Banned
Re: HttpServlet abstract class
Hi chandra,
we can declare a class as abstract even though if it contains all concrete methods(with implementaitons). like
public abstract class Test{
}
or
public abstract class Test{
public void m1(){}
}
Similarly HttpServelt is also has all implemented methods but they do nothing(like in out eg
.
If it is non-abstract when it is instatiate it, it is like do nothing servlet.
That is the reason why it had make abstract so that the actual functionality is implemented in child class which is extending that HttpServlet class.
Thanks & Regards,
--Suresh--
-
Junior Member
Re: HttpServlet abstract class
one more example of abstract class without any abstract method(s),other than HttpServlet existed in J2SE i.e.
public abstract class Component as java.awt.Component;
No method of Component class is abstract 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules