Difference between abstract class and interface

Answer Posted / geetika.......:)

1)all methods in interface need to be defined in class that implemented it.but abstract class may define all some or none of the methods declared in it.
2)abstract class cant instantiate object but class with interface can
3)interface do not have constructors abstract classes have
4)class may implement number of interfaces but can extend only one abstract class
5)variables must be initialized in interface but its not necessary in abstract class.
6)interface has abstract functions but abstract class has abstract as well as concrete functions.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does an appdomain get created?

557


What are library functions?

549


What is cache coherency and how is it eliminated? : .NET Architecture

530


What are the options provived by vss to the user? how it will help us while delevoping application?

1759


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

500






What is .net viewstate?

497


Can I create my own metadata attributes?

537


Explain a .net mobile example with details? : Microsoft dot net mobile

480


define cache memory? : Dot net architecture

541


Session State and can i store desirialized object in state server, if yes how and if not why.

1352


Explain the types of memory management? : .NET Architecture

525


how to change the title of my window?

1423


What is gui programming? : .NET Architecture

511


How cache coherency is eliminated? : Dot net architecture

516


12. Types of polymorphisem[Run and Design Exp.]

1652