I am trying to evaluate a code snippet that has variables initialised to a value. Is there a way to get the field values using java? For the below code:
public void testArea(){
int length = 5;
int breadth = 6;
...
}
Suppose this is the code written by a user, I want to check the value of length and breadth from the backend. How to retrieve this?