title: Java : use string parameter of function as an object name?
body: <p>So I'm learning java and I don't know how to use a string as an object name.</p>
  
  <p>For example, let's suppose I have 3 objects not belonging to the same class, but they all have the variables a, b, c. I want a function to modify these variables, depending on the object name I give, which would work like :</p>
  
  <pre><code>public void myFonction(String objectName)
  {
     objectName.a++; //of course that doesn't word
     objectName.b=15;
  //ect
  }
  </code></pre>
  
  <p>This must be something extremely simple to do, but what I found on the subject didn't fit this case or I didn't understand :)</p>