Hi all,
Just a basic question on access modifiers. If a class has a
string object that will be final, for example a particular error message and that String object is also private and can only be accessed using for example a getErrorMessage method, is there any logic in that string object also being static? Because the string is private it can only ever be accessed by an instance of the object in which it lives so is making it static redundant?
Is there ever a situation where a class attribute should be both private and static?
Cheers,
John