| SOLUTION 2.1 | An abstract class with no nonabstract methods is similar to an interface in terms of its utility. However, note the following.
A class can implement any number of interfaces but can subclass at most one abstract class. An abstract class can have nonabstract methods, which are usually instances of the TEMPLATE METHOD pattern. All the methods of an interface are abstract, whether or not this declaration is explicit. An abstract class can declare instance variables that its subclasses inherit. An interface cannot declare instance variables, although it can establish static final fields. An abstract class can define constructors; an interface cannot. An abstract class's visibility can be public, protected ...
|