unable to track a variable inside a function and store them in a datastructure in java
<p>Given below  is a class named Abc:</p>

<pre><code>class Abc{

static int balance=1000;

public String method1(int amount, String password){
    String newPass=password;
    String str=newPass;
    balance=balance+amount;
    return str;
}
}
</code></pre>

<p>Above class is used in given code below:</p>

<pre><code>class Xyz{

public static void main(String args[]){
    Abc abc=new Abc();
    int x=100;
    String y="gopal";
    String result=abc.method1(x,y);

    System.out.println("The password of the user is: "+result);
}
}
</code></pre>

<p>Now, the question is, I want to get the names of all the variables through which the value of password (i.e. y="gopal") passes away.</p>

<p>Is there a way to do so?</p>

<p>In simple words I just want to track a particular value entered by user and note the name of variables through which it passes throughout the execution.</p>
