Hello,
If I knows the variable name, how can I retrieve its value?
For example:
public class A {
String s;
public A() {
s = "123456";
String x = "XXX";
}
}
How can I know the value of "s"?
Eric
At compile-time or load time?
No, you cannot get the value of a variable
since the value is not available before the
program starts running.