how to pass, from a class to another, the name of a variable (NOT the value)
<p>I need to pass name of a variable created in <code>Class A</code> to the <code>Class B</code>, so I can put a value in that variable (in <code>Class B</code>).
But, in Class B I do not know the name of that variable.
The code is something like this:</p>

<p>Class A</p>

<pre><code>public class A {
      int valore; // this is the variable, in Class b, I don't know this name!
      public  void callClassB(){
            ClassB.Method(what shoudld i put here?)
      }
}
</code></pre>

<p>This is the Class B</p>

<pre><code>public class B {              
       public void Method(the_Name_Of_TheVariable_I_get){
             the_Name_Of_TheVariable_I_get = 5; // i need to do this
       }
}
</code></pre>
