Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

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

Add comment
Views: 2978
Votes: 14
Comments: 0
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.
.
 
Others in this Category
document What is row major and column major form of storage in matrices?
document What are short-, long- and medium-term scheduling?
document Implement the strcmp(str1, str2) function.
document Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible ?
document How can I declare an array with only one element and still access elements beyond the first element (in a valid fashion)?
document What do setjmp() and longjump() functions do?
document What Little-Endian and Big-Endian? How can I determine whether a machine's byte order is big-endian or little endian? How can we convert from one to another?
document Does extern in a function declaration mean anything?
document What is a virtual destructor?
document Is 5[array] the same as array[5]?
» More articles



RSS