Hello all,
Thanks in advance for any help!
I am trying to have dynamic access to a constant as follows:
//Code from other samePackage.class.method
// Global.LANG = "English" OR "French" for this example
int lang = Language.(Global.LANG.toUpperCase());
....................^ error (identifier) expected!
//Class with constants I want access to
public final class Language
{
...
public static final int ENGLISH = 6;
public static final int FRENCH = 7;
...
}
Is there a way to dynamicaly declare the identifier in JAVA?
Basically like an e_v_a_l() function or a {eval} statement in JAVA?
No additional classes can be added to the system allow for this functionality.