IT Community - Software Programming, Web Development and Technical Support

List out all the similarities/difference between an Abstract class and Interface?

This is a discussion on List out all the similarities/difference between an Abstract class and Interface? within the ASP and ASP.NET Programming forums, part of the Web Development category; list out all the similarities/difference between an Abstract class and Interface?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-24-2007, 03:14 AM
H2o H2o is offline
D-Web Analyst
 
Join Date: Jul 2007
Posts: 246
H2o is on a distinguished road
Question List out all the similarities/difference between an Abstract class and Interface?

list out all the similarities/difference between an Abstract class and Interface?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 03:16 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: List out all the similarities/difference between an Abstract class and Interface?

Differences are as follows:
Interfaces provide a form of multiple inheritance. A class can extend only one other class. Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.
A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class. Interfaces are slow as it requires extra indirection to to find corresponding method in in the actual class. Abstract classes are fast.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between abstract class and interface srikumar_l C# Programming 0 12-17-2007 03:18 AM
difference between abstract class and interface vijayanand Java Programming 2 11-27-2007 09:19 PM
Similarities and Difference between C# and Other Languages Sundaram C# Programming 3 09-01-2007 12:14 AM
What’s the difference between an interface and an abstract class? Sabari Java Programming 1 07-17-2007 05:00 AM
Abstract Class nhoj Java Programming 1 05-08-2007 05:35 AM


All times are GMT -7. The time now is 07:58 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0