What is the difference between Abstract and Interface?

Answer Posted / ntmohare

Abstract Class:
(1)it contains both abstract methods and non abstract methods
(2) object can't be created just through reference we are calling all the methods
(3) it is implemented by subclass i.e which class is extended from this
abstract class contains only nonabstract this situation also code will compile fine but problem at runtime
abstract can't be declared with Final Synchronized Native just your requirements you implement some methods in the abstract class
this class also contain Constructor

========
Interface contains all abstract methods
all methods compulsory implemented by particular class
interface does not contain Constructor

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?

603


Is list passed by reference c#?

481


What is regex c#?

494


What is the difference between abstraction and encapsulation in c#?

499


What is difference between abstract class and interface in c#?

477






What does .length do in c#?

525


What is the difference between static and private constructor in c#?

460


What is the difference between array and arraylist c#?

468


Why we need get set property in c#?

543


What do you mean by hashtable c#?

575


What is string literal in c#?

527


What does || mean in programming?

502


How big is int16?

520


List down the different ide’s provided by microsoft for c# development.

477


What is the difference between method and function in c#?

447