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
Post a Comment