banner image
Sedang Dalam Perbaikan

A method or class is abstract what does it mean?


What does it mean that a method or class is abstract?

Abstract classes are used to define only part of an implementation. Because, information is not complete therefore an abstract class cannot be instantiate. However, like regular classes, they can also contain instance variables and methods that are full implemented. The class that inherits from abstract class is responsible to provide details.

 Any class with an abstract method (a method has no implementation similar to pure virtual function in C++) must be declared abstract, yet you can declare a class abstract that has no abstract method. If subclass overrides all abstract methods of the super class, than it becomes a concrete (a class whose object can be instantiate) class otherwise we have to declare it as abstract or we can not compile it. The most important aspect of abstract class is that reference of an abstract class can point to the object of concrete classes.
A method or class is abstract what does it mean? A method or class is abstract what does it mean? Reviewed by MCH on April 27, 2014 Rating: 5

No comments:

Powered by Blogger.