Why one sometimes writes
abstract void etwas();
codcodecode
void etwas()
{
return;
}
Instead of skipping the single declaration? In which cases is it necessary?
Why one sometimes writes
abstract void etwas();
codcodecode
void etwas()
{
return;
}
Instead of skipping the single declaration? In which cases is it necessary?
In the same class, this almost never happens.
It happens when you have an abstract class, which defines an abstract method. You do so when you want to make sure that anyone who extends this abstract class, will be forced to provide his own implementation for this abstract method. Otherwise a compile error occurs.