Where would you use Abstract class and Interface?

Answer Posted / mayank bhatnagar

Interface includes just the definition of methods whereas
Abstract Classes are just like classes and hold all
functionality of classes except certain features.
The only difference between Abstarct Classes and Interfaces
is the use.Abstract Classes were introduced becoz of
diamond problem in C,C++.You can only inherit these classes
but cannot instantiate(i.e. no object of these classes can
be created, there can be one or more methods abstact in
such classes).
Interfaces are public and can be used/inherited by multiple
classes which was not before possible.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we store decimal data in .net?

744


What is pre-jit?

717


What is the use of console application?

786


What is the advantages of VB.NET?

797


Define serialization in .net?

814


What is the advantage of using system.text.stringbuilder over system.string?

834


What are the parts of the visual basic control?

718


Write a VB.Net console program to check whether a number is perfect or not.

7295


What is the importance of a Button control?

1083


What are jagged arrarys ?

766


Which control is an example of an object in vb net?

6688


What is meant by jagged arrays?

762


What is globalization?

735


Explain private assembly?

687


How can we remove handlers at run time?

790