what is the difference between interface and abstraction?

Answer Posted / navin c. pandit

In Interface, all the member functions are abstract implicitly
so it is imp. to define all fn. declared inside Interface.
Moreover, we cann't define a fn. or we cann't declare any
member variable in an Interface. Also, we cann't declare or
define any non-abstract method in Interface.

In Abstract class, we can declare an abstract method as well
as we can also define a non-abstract method. We can also
declare a variable member in abstract class.

In both the condition, declared abstract method is
implemented out side the class i.e in derived class which
inherits Interface/Abstract class, whatever you have used.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create instance of private class in c#?

693


How do I download a program to my desktop?

662


Why is c# better than java?

687


Explain jagged arrays in c#?

771


What is an Interface in C#?

739


What is monitor in C#?

782


What can I create with c#?

675


What is the use of list in c#?

652


Define an array?

710


Can abstract class be sealed in c#?

657


How do I run managed code in a process?

727


What is connection pooling in ado.net?

725


Why would you use untrusted verification?

716


Can we override constructor in c#?

700


What is string class in c#?

687