Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

The difference between an Interface and an Abstract class

Fri Nov 07, 2008 12:44 pm

Q: What is the difference between an Interface and an Abstract class?


A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.



Post a reply
  Related Posts  to : The difference between an Interface and an Abstract class
 java abstract class,concrete class and interface     -  
 What is an Abstract Class? !!!     -  
 why cant instantiate an abstract class     -  
 make abstract class     -  
 how to Define abstract class in php     -  
 Is garbageCollector a Class or interface?     -  
 Interface Collection and Class Collection     -  
 difference between a static and a non-static inner class     -  
 Abstract Classes in jsp     -  
 What is an abstract method     -