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 I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?

760


What is dll in c#?

736


In object oriented programming, how would you describe encapsulation in c#?

759


What is static noise?

714


If I want to override a method one of class A and in class b then how do you declare?

972


What is scope c#?

670


How to open a new form on button click in Windows forms?

750


Where do we use static class in c#?

694


What is the difference between method overriding and method overloading?

688


How many types of variables are there in c#?

735


What is overriding in c#?

688


2. What happened when BO object has been called?

1789


Where is c# compiler located?

702


What is array and types of array in c#?

699


Why do we use Design Pattern in C#?

829