I have a Language
class, for example, which will contain constant attributes of type String
, which will be used all over the program to print x
or y
Strings
based on a setting when launching the program.
How could I do this? I throught of using Enum
, but I lack experience with them and failed to apply them correctly; tried diferent classes which inherit Language
and must specify the values of each String
, but that looked like a home-made Enum
.
As a plus, I'd love to have an XML file containing each String
content, but I have absolutely no idea of grabbing values of an XML file in java (I probably know how to do them separatedly). If possible, a little example or documentation.
Thanks.