title: Get variable by name from a String
body: <p>Example code:</p>
  
  <pre><code>int width = 5;
  int area = 8;
  int potato = 2;
  int stackOverflow = -4;
  </code></pre>
  
  <p>Now, say I want to have the user input a string:</p>
  
  <pre><code>String input = new Scanner(System.in).nextLine();
  </code></pre>
  
  <p>Then, say the user inputs <code>potato</code>. How would I retrieve the variable named <code>potato</code> and do stuff with it? Something like this:</p>
  
  <pre><code>System.getVariable(input); //which will be 2
  System.getVariable("stackOverflow"); //should be -4
  </code></pre>
  
  <p>I looked up some things and did not find much; I did find a reference to something called "the Reflection API," but that seems too complicated for this one simple task.</p>
  
  <p>Is there a way to do this, and if so, what is it? If "Reflection" does indeed work and if it is the only way, then how would I use it to do this? The tutorial page for it has all sorts of internal stuff that I can't make any sense of.</p>
  
  <p><strong>EDIT:</strong> I need to keep the <code>String</code>s in the variables for what I am doing. (I can't use a <code>Map</code>)</p>