I need a small Container-Class for storing some Strings which should be immutable. As String itself is an immutable type, I thought of something like that:
p
I would do what you believe is simplest and clearest. If you have a data value class which is only used by a restricted number of classes. esp a package local class. then I would avoid getter/setters and use package local or public fields.
If you have a class which you expect other modules/developers to use, following a getter/setter model may be a safer approach in the long run.