On Thu, 28 Jun 2001, Pier Fumagalli wrote:

> Bo Xu at [EMAIL PROTECTED] wrote:
>
> > "Rajeshwar Rao.V" wrote:
> >
> >> Hi all,
> >>  Why ServletContext is declared as absrtact?
> >>  What does it mean by abstract interface?
> >>  As I know , every interface is by default abstract...
> >>  Am i missing something...
> >> -raj-
> >> [...]
> >
> > Hi :-) I read the source code of ServletContext.java in
> > jakarta-servletapi-4_0-b5.zip:
> > http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b5/src/
> >
> > it is  "public interface ServletContext {...}", I don't find
> > "abstract", perhaps you use another version of
> > Servlet API?
>
> Java Language specification: An interface is ALWAYS all-abstract, all its
> methods are abstract... :)
>
> Class -> can be instantiated as none of its methods are abstract
>
> Abstract Class -> cannot be instantiated as some of its methods are abstract
>                   can be extended but not implemented
>
> Interface -> can be instantiated as all of its methods are abstract
               ^^^
Was that supposed to be "cannot"?

>              can be extended by another interface and implemented by a class

I suppose for completeness under "Class" it should include:

           can be extended but not implemented

Unless it's final.  (What about abstract final classes? :-).

Boy, when you try to be complete, you really get bogged down with
details :-).

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to