Difference between abstract class and interface

Answer Posted / ashish gupta

1)Abstract class can have either declaration or definition
of any method,however an interface must declare a method
and it can not define it.

2)An interface makes some sort of contract to its
implementing classes to define all the declared methods
within those classes.

3)A class/subclass should Extend the abstract class while a
class/subclass should Implement the interface.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what does the term "green architecture" mean? : Dot net architecture

553


What is a managed code? : Dot net architecture

561


What is the difference between l1 and l2 cache? : Dot net architecture

525


IS IT Possible to inherit the AJAX page from child class which(child) is inherit from page class.Because i should apply some security in child class

1542


Do you know textbox and textview controls of .net mobile? : Microsoft dot net mobile

508






readonly syntax ?

1414


How do I write to the application configuration file at runtime?

526


What is the purpose of hard disk? : Dot net architecture

493


Define a virtual memory? : Dot net architecture

511


Use of Enable view state ? if turn off what happen ?

3817


HttpHendler and HttpModules

1692


Explain the race around condition? How can it be overcome? : Dot net architecture

528


Explain cache memory? : Dot net architecture

540


What is a service class?

539


What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?

513