Specification states that interface is intended to define the contract for what a class can do and contains a set of methods required to implement. But at the same time, interface may have constants.

For what purpose it is allowed in Java?

What is the point of existence of constants in interface and how can they be used in it? As I understand they can only be taken as arguments by methods. But I do not see much point because interface doesn't say anything about how a class will implement its methods.

Edit
Report