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

Answer:

No. To ensure consistency, a constant should be defined only once, in one interface.


Public Interfaces

However, it is OK if two interfaces include the same method header. A class that implements both interfaces only needs to provide one complete method definition to satisfy both interfaces.

An interface can be made public. This is usually what is done. When a class or interface is public it must be the only public class or interface in the file that contains it.


QUESTION 25:

Can an interface extend another interface?


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