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

Explain the advantages of vb.net?

598


What is writeline in vb.net?

613


What are option strict and option explicit?

905


Explain the difference between an xml "fragment" and an xml "document."

583


What is the differnce between managed code and unmanaged code?

622






What is internal keyword in .net framework?

710


Name some different types of control?

599


Explain option strict?

638


How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently

2096


What is late binding and early binding?

636


Explain the difference between value and reference types?

545


i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate

1986


Did vb6 support multi-threading ?

615


Why do we use ansi keyword?

649


Tell us how many languages are supported by .net?

594