title: Append a number in the end of a variable name in java
body: <p>Suppose that I have a lot of variables defined in my code with names such as this</p>
  
  <pre><code>public javax.swing.JPanel BenderPanel1;
  public javax.swing.JPanel BenderPanel2;
  public javax.swing.JPanel BenderPanel3;
  etc...
  </code></pre>
  
  <p>So their general type is like this: <code>BenderPanel"NUMBER"</code>.</p>
  
  <p>I want to access some of them and set their visibility with <code>.setVisible(false);</code> but the number of those panels which I want to access is user-defined on run time.</p>
  
  <p>Is there any possible way through a library to append a number to the end of each variable in order to access it in a <code>for</code> loop, like this:</p>
  
  <pre><code>for (int i=1; i&lt;=UserInput; i++)
  {
       BenderPanel"i".setVisible(false); // Watch this "i" right there.
  }
  </code></pre>
  
  <p><strong>WITHOUT</strong> the need to add them on <code>ArrayList</code> first and do it with the obvious way?</p>