Interviewer And Interviewee Guide

Senior .Net Developer Interview Question:

Do you know what is the difference between an abstract class and an interface?

Submitted by: Muhammad
☛ An abstract class can contain both public and private constructors, methods, and fields. On the contrary, the interface contains only methods and public properties.
☛ You can only inherit from an abstract class, but implement many interfaces.
☛ An interface defines behavior, something that the class that implements it can do. Contrary, an abstract class defines what the class is and what it represents.
☛ You can't instantiate anyone.
☛ An abstract class is useful when creating components, making a partial initial implementation and a specific definition. This leaves you free to implement other methods.
Submitted by: Muhammad

Read Online Senior .Net Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.