Answer: abstract modifier is used for either class or a method.
abstract class is a class which has no complete implementations. All the implementations are done by the derived classes who inherits the properties of that class.
abstract methods are only limited to
abstract class and we cannot declare them outside. It is an empty method which has no body, no curly braces ({}) etc.
abstract class MyClass // This is an abstract class.
{
public abstract int Function(); // This is an abstract method.
.........;
........;
}
Asked In: Spotted While Learning |
Alert Moderator