title: Can't access methods on object from array
body: <p>I'm trying to call a method on an object I'm accessing from an array. For some reason, the only methods I can call are methods of the Object class. Help? Here is my code:</p>
  
  <pre><code>listItem = findViewById(myResourceId);
  TextView itemTextView = ((TextView)listItem.findViewById(R.id.list_item_text));
  ImageView itemImageView = ((ImageView)listItem.findViewById(R.id.list_item_thumbnail));
  ClassMember currentMember = myClassMembers[position];
  itemImageView.setImageResource(getResources().getIdentifier(currentMember.getMemberThumbnailId()));
  </code></pre>
  
  <p>The problem is that I can't call the getMemberThumbnailId on my currentMember object. </p>
  
  <p>Strangely enough, I can get it to work if I do</p>
  
  <pre><code>myClassMembers[position].getThumbnailId();
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>ClassMember currentMember = myClassMembers[position];
  currentMember.getThumbnailId();
  </code></pre>