title: Array List Intent extra in Java
body: <p>I am trying to skip my <code>ArrayList</code> through <code>Intent</code>. But I cannot find what to write in extra? Any get methods I am getting errors like "not applicable for string."</p>
  
  <p>Item Details:</p>
  
  <pre><code>public class ItemDetails {
  
  public String getName() {
      return name;
  }
  public void setName(String name) {
      this.name = name;
  }
  public String getItemDescription() {
      return itemDescription;
  }
  public void setItemDescription(String itemDescription) {
      this.itemDescription = itemDescription;
  }
  public String getPrice() {
      return price;
  }
  public void setPrice(String price) {
      this.price = price;
  }
  public int getImageNumber() {
      return imageNumber;
  }
  public void setImageNumber(int imageNumber) {
      this.imageNumber = imageNumber;
  }
  
  public int getVideoNumber() {
      return videoNumber;
  }
  public void setVideoNumber(int videoNumber) {
      this.videoNumber = videoNumber;
  }
  
  public void setChild(ArrayList&lt;ItemDetails&gt; item_child)
  {
      this.item_child = item_child;
  }
  public ArrayList&lt;ItemDetails&gt; getChild()
  {
      return this.item_child;
  }
  public void setParent(ArrayList&lt;ItemDetails&gt; item_parent)
  {
      this.item_parent = item_parent;
  }
  public ArrayList&lt;ItemDetails&gt; getParent()
  {
      return this.item_parent;
  }
  
  
  
  private String name ;
  private String itemDescription;
  private String price;
  private int imageNumber;
  private int videoNumber;
  private ArrayList&lt;ItemDetails&gt; item_child;
      private ArrayList&lt;ItemDetails&gt; item_parent; 
  }
  </code></pre>
  
  <p>My class:</p>
  
  <pre><code>static class ViewHolder {
      TextView txt_itemName;
      TextView txt_itemDescription;
      TextView txt_itemPrice;
      ImageView itemImage;
      ArrayList&lt;ItemDetails&gt; item_parent;
      ArrayList&lt;ItemDetails&gt; item_child;
  }
  </code></pre>
  
  <p>My putExtra:</p>
  
  <pre><code>intObj.putExtra("exerciselist",obj_itemDetails.getChild());
  </code></pre>
  
  <p>GetChild function :</p>
  
  <pre><code>public ArrayList&lt;ItemDetails&gt; getChild()
  {
     return this.item_child;
  }
  </code></pre>
  
  <p>But I cannot find how am I supposed to write to get arrayList?</p>
  
  <pre><code>ArrayList&lt;ItemDetails&gt; child1 = getIntent().?????????
  </code></pre>