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

Eclipse formatter for java ending braces -

ruby - Nesting modules inside of a Rails eninge gem -

java - Are there any classes that implement javax.persistence.Parameter<T>? -