The blog has moved to the new site F10Debug.com

Tuesday, April 21, 2015

What are abstract classes?

What is Abstract Class?

a)      Classes can be declared as abstract class by using abstract keyword.

b)      Abstract class is designed to act as a base class (to be inherited by other classes).Abstract class is a design concept in program development and provides a base upon which other classes are built.

c)      Abstract class does not allow creating instance or object of it; we must inherit to use it, as in figB.


d)      Abstract classes can have abstract methods as well as non-abstract methods (which must be implemented in the child class).





e)      A non-abstract class derived from an Abstract class must include implementations for all inherited abstract methods.



f)      An abstract class cannot be a sealed or static class.



g)   An abstract method cannot be private, protected or protected internal.



h)      An abstract member cannot be static.


No comments:

Post a Comment