August 2004
Intermediate to advanced
480 pages
9h 41m
English
An abstract class is a class whose declaration includes the keyword abstract. Based on that definition, you should be able to write the simplest possible abstract class. Okay…geez…I'll do it. How about this:
public abstract class SimplestAbstractClass { }
That meets the definition, and so it compiles.
You might never write an empty class such as this. But there are occasions when you will come across such empty classes; such usage aims to provide a formal organization to an application for later possibilities for extensibility.
The following is also an abstract class:
public abstract SecondAbstractClass {
public abstract void someMethod();
}
The preceding code declares an abstract class that includes an abstract ...
Read now
Unlock full access