Difference between abstract class and interface

Answers were Sorted based on User's Feedback



Difference between abstract class and interface..

Answer / mkm

)1. Accessibility modifier(Public/Private/internal) is
allowed for abstract class.
Interface doesn't allow accessibility modifier

2. class can inherit only one abstract class
class can implement more than one interface.

(2) An abstract class can contain fields,
constructors, or destructors and implement properties. An
interface can not contain fields, constructors, or
destructors and it has only the property's signature but no
implementation.
(3) An abstract class cannot support multiple
inheritance, but an interface can support multiple
inheritance. Thus a class may inherit several interfaces
but only one abstract class.
• Interface is used to "implements"; whereas abstract class
is used to "extends".
• Interface can be used to achieve multiple inheritance;
abstract class can be used as a single inheritance.

Is This Answer Correct ?    13 Yes 2 No

Difference between abstract class and interface..

Answer / venu

Abstract class and interface

Abstract class we can declare variables here,bt interface we
cannot,interface methods are by default is public,bt
abstract nt.
abstract we can declare object bt we cannot declare instants
of the class.bt interface we cannot do both.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is an application domain ?

2 Answers   Microsoft,


When does the application ONEND event handler fire?

1 Answers   C Squared Systems, Verinon Technology Solutions,


What is mvc in angular?

0 Answers  


what is the difference b/w Asp.net server controls and html server controls in .net?

2 Answers   iGate, Profiniti Systems,


if you disable view state of a textbox will it maintain data during postbacks.if yes reason

9 Answers   FactorH, Jindal, Oxi Infotech,






Why Unload event of MasterPage Calls first in ASP.net ?

0 Answers   HCL,


What is boxing and how it is done internally?

1 Answers   Microsoft,


Which data types are supported by the RangeValidator control?

2 Answers   Siebel,


Where would you use an IHttpModule, and what are the limitations of anyapproach you might take in implementing one?

1 Answers   Siebel Systems,


How will you write a web service for secure socket layer? What is secure socket? Have you done any socket programming? What is single thread and multi thread? What are the differences between .NET 1.1 and .NET 2.2? What is the command to connect to a StoredProcedure? How many types of Adapters are available in ADO.NET? Why DataAdapters are important? What is DataSet? It's important to compile the ASP.NET application before using it? What protocol you use to stream the audio and Video data? What are the different kind of network protocols? Write how will you connect to a database using DataSet? Why we use AJAX? What AJAX can do which JavaScript can't do? In a page using Windows Media API, if we press a button and in succession quickly press another button, what do you think will happen? Will the application wait for the first button response and then execute the second one or directly second button command will execute. What is the architecture of your application? What is connection pooling in SQL? Tell some functions of Windows Media API? How you will detect, whether the ActiveX is installed in the system before accessing it? What are validators are available in ASP.NET? What are the basic concepts of OOPS? What is abstraction?

0 Answers   Tesco,


IN an ASP.NET Web application if there is any error, how can you debug?

0 Answers   Siebel,


About CLR, reflection and assemblies?

0 Answers   Microsoft,


Categories