java - Interface Vs Final class to store the final variables -


i have class contains final variables. e.g:

public class constants {     public static final string prefix = "some prefix";     public static final string suffix = "some suffix";     //and on... } 

which type recommended here - interface or final class?

interfaces used define contract. in code copy paste, these constants should defined in final class. check what best way implement constants in java?


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -