title: Newbie: Using a variable as the rhs argument to the dot operator?
body: <p>I have a list of objects and I'll need to access a specific one based off of random user input corresponding to an id. My limited knowledge at this point led me to something like:</p>
  
  <pre><code>String id; 
  if(id.equals("apple")){ //fixed silly error, thanks
      return objectList.id.memberName; 
  } //etc...
  </code></pre>
  
  <p>Is this possible, or is there a better approach?</p>