Sno | Abstract Class | Interface |
1 | Can have implemented Methods | Cant |
2 | A class can inherit only one abstract class | A Class can implement any number of Interfaces. |
3 | We go for Abstract classes on such situations where we need to give common functionality for group of related classes | We go for Interface on such situations where we need to give common functionality for group of un-related classes |
4 | If you add a new method, then you can provide a default implementation and so no need to make any change to existing work. | If you add a new method, then you need to change all the existing work. |
5 | Static and Instance constants are possible. | Only Static constants are possible. |
Saturday, September 26, 2009
what are the Differences between Abstract Class and Interface ?
Subscribe to:
Post Comments (Atom)
DISCLAIMER
WE USE LINKS TO SITES AND NOT DIRECT DOWNLOAD LINKS. THERE NO FILES HOSTED ON OUR SERVER,THEY ARE ONLY INDEXED MUCH LIKE GOOGLEWORKS.The hosting server or the administrator cannot be held responsible for the contents of any linked sites or any link contained in a linked site, or changes / updates to such sites.
BY ENTERING THIS SITE YOU AGREE TO BE BOUND BY THESE CONDITIONS
If you don't like the software posted here, please don't hesitate to let us know and we will unpost it.
No comments:
Post a Comment