Hey guys I am a total java newbie and to be honest I am not sure on how to explain my problem to you.
So I have 2 classes, one of which is inherited by the other.
Now I am not allowed to change the superclass, or else this would be much easier.
The problem is that in my subclass I want to access a variable (let's call it variable1)
This variable is defined like following in the superclass:
static final String variable1 = (String)AccessController.doPrivileged(new PrivilegedAction()
{
public Object run() {
return System.getProperty("variable1", "\n");
}
}
);
Now in my subclass I try the following:
this.finalOutputFormat = (replaceKeys(this.format) + variable1);
But it doesn't work because eclipse keeps telling me that variable1 "is not visible".
That is pretty much the only error I've got.
Do you have any idea why variable1 is not visible to my subclass? The superclass is imported as a library but in a different package, obviously.
I hope my description of the situation is not too confusing but right now I don't have much more information than this.
Thanks.