What is the difference between Abstract and Interface?

Answer Posted / nevin jain

-Abstract class contains both data members n members
functions.... but Interface contains only members functions

-Abstract class contains both complete n incomplete methods,
incomplete methods has to be explicitly marked as abstract
method...where as Interface contains all incomplete method n
no abstract keyword is requires explicitly.

-Abstract class n theirs members can be public,private or
protected whereas... By default access modifier are public n
no other access modifier can be given to interface n theirs
members.

-Abstract class members are inherit into derived class as
inherit members whereas... Interface members as inherited as
prototype members..

-Abstract class contain constructor whereas.. interface does
not contain..

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need static in c#?

724


What is string interpolation in c#?

739


What are custom attributes in c#?

680


Explain use of abstract and sealed classes in c#?

667


What is the difference between iqueryable and ienumerable?

723


How to add controls dynamically to the form using c#.net.

690


Explain streamreader/streamwriter class?

745


What is difference between array and list?

725


Explain data types in c#?

738


What is the use of readkey in c#?

753


What is static noise?

714


write a C# Program add two matrix ?

776


what are pointer types in c#

768


What are interfaces in c#?

717


What is multithreading? What are the problems that comes with multithreading and how to manage them?

782