java - Static Variables on Properties File vs Singleton vs Static Class vs enum -
i have lot of static variables use in whole application like:
class a: final static string a="a"; final static string b="b"; final static string c="c"; class b: final static string a="a"; final static string b="b"; final static string e="e"; class c: final static string a="a"; final static string c="c"; final static string f="f";
i don´t need change variables @ runtime.
so best opt here?
you can put these variables in interface. way, make these "public static final".
ideally can put these properties file. in case, these should config properties of application may control feature or could've been changed outside(e.g. url).
Comments
Post a Comment