I am trying to find a better way to create a class whose sole purpose is a container of global static variables. Here's some pseudo code for a simple example of what I mean ...
public class Symbols {
public static final String ALPHA = "alpha";
public static final String BETA = "beta";
}
I don't need constructors or methods. I just need to have access to these "characters" everywhere, just by calling:Symbols.ALPHA;
I An actual String value is required , so I cannot use an enumeration type. What would be the best way to achieve this?
source
share