• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between interface and Abstract Interface

 
Kriti Garg
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is there any difference between Interface and Abstract Interface
or
its just obsolete to user abstract keyword before interface?


Kriti
 
J Williams
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the answer is that the abstract part is simply implied whether you write it or not. I wouldn't call it obsolete, just a shortcut. An interface is always abstract so it is not necessary to specify it as abstract. Think of an interface as an abstract class except an interface's methods are all abstract unlike an abstract class which may have non-abstract methods.
[ December 16, 2004: Message edited by: J Williams ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic