August 2003
Intermediate to advanced
672 pages
16h 23m
English
Modifiers abstract and final can be applied to top-level and nested classes.
A class can be specified with the keyword abstract to indicate that it cannot be instantiated. A class might choose to do this if the abstraction it represents is so general that it needs to be specialized in order to be of practical use. A class Vehicle might be specified as abstract to represent the general abstraction of a vehicle, as creating instances of the class would not make much sense. Creating instances of non-abstract subclasses, like Car and Bus, would make more sense, as this would make the abstraction more concrete.
A class that has one or more abstract methods (see Section 4.10, p. 147) must be declared ...
Read now
Unlock full access