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

What's the difference between an interface and an abstract class?

Add comment
Views: 359
Votes: 1
Comments: 0
An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.
Others in this Category
document The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes?
document What is Collection API?
document Does Java provide any construct to find out the size of an object?
document How can you compare a part of the name rather than the entire name?
document What is ActionServlet?
document Can I have multiple main methods in the same class?
document Primitive data types are passed by reference or pass by value?
document What is daemon thread and which method is used to create the daemon thread?
document Give an example of using the publish/subscribe model.
document Give the Details of XML files used in Validator Framework?
» More articles



RSS