*
The moose likes Beginning Java and the fly likes abstract interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abstract interface?" Watch "abstract interface?" New topic
Author

abstract interface?

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
I know what abstract classes and what interfaces are. But, whey would we need to declare an interface as 'abstract'? For ex: (FilterChain interface of javax.servlet.http). I do not see any necessity of declaring an interface as an abstract. Am I missing something? Can some one please shed some light?
-Bala
Jacky Chow
Ranch Hand

Joined: Sep 01, 2002
Posts: 63
hi,
interfaces are implicitly abstract, that means use or not use the abstract key word with interface are the same.


Jacky
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Exactly my point. Why use the word 'abstract' when it's not needed? It's like saying JSP page.
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
That's what the JLS says in 9.1.2.1 abstract Interfaces
"Every interface is implicitly abstract. This modifier is obsolete and should not be used in new Java programs. "
W.
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Thanks for clarifying that Wilfried. So, what does this mean? That the people who wrote the lattest Servlet API would did NOT read the JLS?
And I thought I was the only one who tried to learn Java without reading the JLS. hehe!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: abstract interface?
 
Similar Threads
Abstract interface!!!????
Question on Interface
About interface and abstract classes
abstract interface
Exact Use of Abstract Class And Interface