title: Correct way to add objects to an ArrayList
body: <p>I am trying to add an object to an arraylist but when I view the results of the array list, it keeps adding the same object over and over to the arraylist.  I was wondering what the correct way to implement this would be.</p>
  
  <pre><code>    public static ArrayList&lt;Person&gt; parsePeople(String responseData) {
      ArrayList&lt;Person&gt; People = new ArrayList&lt;Person&gt;();
      try {
  
          JSONArray jsonPeople = new JSONArray(responseData);
          if (!jsonPeople.isNull(0)) {
              for (int i = 0; i &lt; jsonPeople.length(); i++) {
                  People.add(new Person(jsonPeople.getJSONObject(i)));
              }
  
          }
  
      } catch (JSONException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (Exception e) {
  
      }
  
      return People;
  }
  </code></pre>
  
  <p>I have double checked my JSONArray data and made sure they are not duplicates.  It seems to keep adding the first object over and over.</p>