I am working on a project (using JDK7) which has 30 to 40 constants. These constants are being used by many classes of my project. I want to separate these constants into a single file. Which type of file should I prefer?, Interface or Utility class, I am thinking of using interface. Would it be appropriate ?
According to the SonarQube rules Constants should not be defined in interfaces
You should use a class or an enum.