title: ArrayList returns last item for all entries
body: <p>I am trying to populate an ArrayList with objects to pass to an ArrayAdapter (eventually).  I have pulled out some code into a small test project to illustrate the issue.</p>
  
  <p>I have a class called Rules which has two members, Gender and Age (Rules.Java).  In the class MyArrayTest I am creating instances of Rules objects and adding them to the rule_parts ArrayList.  When I loop over the Array the loop executes the expected number of times but duplicates the last element.  Please could someone point out why.</p>
  
  <p>Rules.Java</p>
  
  <pre><code>public class Rules {
  public static String Gender;
  public static Integer Age;
  
  
  public Rules(String G, Integer C) {
  //super();
      Gender = G;
      Age = C;
      }
  }
  </code></pre>
  
  <p>Main Class - MyArrayTest.java</p>
  
  <pre><code>import java.util.ArrayList;
  
  
  public class MyArrayTest {
  
  
  private static ArrayList&lt;Rules&gt; rule_parts = new ArrayList&lt;Rules&gt;();
  
  public static void main(String[] args) {
  
  
  // Rules Array  
  rule_parts.add(new Rules("Male",25));
  rule_parts.add(new Rules("Female",22));
  
  System.out.printf("\n\nRules:\n\n");
  for (Rules r : rule_parts) {
      System.out.printf (r.Gender + "\n");
      System.out.printf(r.Age + "\n");
  
  
      }
  
  }
  
  }
  </code></pre>
  
  <p>Output is as follows:</p>
  
  <p>Rules:</p>
  
  <p>Female
  22</p>
  
  <p>Female
  22</p>