Is it possible to create variable for variable Names ? like this
class example {
String VAR1 = "id";
String VAR2 = "mark";
public foo()
{
int VAR1;
int VAR2;
}
}
Or Say I'm having nested class Parent and Child.
class Parent {
char a;
//some variables
class child {
//char b = Parent.a;
}
}
I'm having a lot of class like this.So I need to replace that 'Parent' in 'Parent.a' with something like a MACRO so that I don't want to change every 'Parent' in its child classes individually.
Is there any possible solution for this ?