Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Articles Author
Fri, 31-Oct-2014 Authors
All Time Authors
Vishal@Neeraj
38680
Rajkatie
20600
Bharathi Cherukuri
18040

Latest members | More ...


(Statistics delayed by 5 minutes)
 Interview Question

What is Abstract Class?

 Posted by Poster on 4/24/2008 | Category: OOPS Interview questions | Views: 218686

Answer:

Abstract class is a class that can not be instantiated, it exists extensively for inheritance and it must be inherited. There are scenarios in which it is useful to define classes that is not intended to instantiate; because such classes normally are used as base-classes in inheritance hierarchies, we call such classes abstract classes.

Abstract classes cannot be used to instantiate objects; because abstract classes are incomplete, it may contain only definition of the properties or methods and derived classes that inherit this implements it's properties or methods.

Static, Value Types & interface doesn't support abstract modifiers. Static members cannot be abstract. Classes with abstract member must also be abstract.

For detailed example, read this article http://www.dotnetfunda.com/articles/article467-abstract-class--explained.aspx


Asked In: Many Interviews | Alert Moderator 

Found interesting? Add this to:



Comments or Responses

Posted by: Raja on: 2/20/2009

Abstract classes are classes that contain one or more abstract methods (methods without implementation). An abstract method is a method that is declared, but doesn't contain implementation (like method declaration in the interface). Abstract classes can't be instantiated, and require subclasses to provide implementations for the abstract methods. This class must be inhertied. This class is mostly used as a base class.

Posted by: Poster on: 2/17/2011 | Points: 10

I think this article can also be read to understand Abstract class in C# http://www.dotnetfunda.com/articles/article1183-abstract-class-.aspx.

Posted by: Abhisekjani on: 3/22/2011 | Points: 10

An abstract class can contain both abstract and non abstract methods in it.if any of its child class wants to consume its non abstract method then it first implements all the abstract method of parent.

Login to post response