title: How to add data to different model class android
body: <p>I'm newbie about android programming and Today I want to add data to another model class</p>
  
  <p>and in another class model is same model </p>
  
  <p>but I have no idea to add it</p>
  
  <p>example</p>
  
  <p>my first model</p>
  
  <pre><code>public class TelephoneModel {
   private List&lt;DataBean&gt; data;
   public List&lt;DataBean&gt; getData() {
          return data;
      }
  
      public void setData(List&lt;DataBean&gt; data) {
          this.data = data;
      }
  
      public static class DataBean {
          private String id;
          private String name;
  
   public String getId() {
              return id;
          }
  
          public void setId(String id) {
              this.id = id;
          }
  
  public String getName() {
              return name;
          }
  
          public void setName(String name) {
              this.name = name;
          }
  }
  </code></pre>
  
  <p>and my second model</p>
  
  <pre><code>public class TelephoneDetailModel {
  private List&lt;DataBean&gt; data;
    public List&lt;DataBean&gt; getData() {
          return data;
      }
  
      public void setData(List&lt;DataBean&gt; data) {
          this.data = data;
      }
  
      public static class DataBean {
    private String id;
          private String name;
  
   public String getId() {
              return id;
          }
  
          public void setId(String id) {
              this.id = id;
          }
  
          public String getName() {
              return name;
          }
  
          public void setName(String name) {
              this.name = name;
          }
  }
  }
  </code></pre>
  
  <p>and I have data in </p>
  
  <pre><code>List&lt;TelephoneModel.DataBean&gt; databeans = new ArrayList&lt;&gt;;
  List&lt;TelephoneDetailModel.DataBean&gt; dataDetailbeans = new ArrayList&lt;&gt;;
  </code></pre>
  
  <p>and I want to add data <code>databeans</code> to <code>dataDetailbeans</code></p>
  
  <p>How to add it ,please give example for me,</p>
  
  <p>thanks!</p>