go to previous page   go to home page   go to next page

Answer:

No. private would mean that nobody could use it, which is not sensible.


Hierarchy of Interfaces

An interface can be an extension of another interface (but not an extension of a class):

public interface ExciseTaxable extends Taxable
{
  double extraTax = 0.02;
  double calculateExtra();
}

A complex hierarchy of interfaces can be constructed using this feature. This is an advanced feature which you will probably not need to use.


QUESTION 26:

Can a class extend an interface?