How to pass object to an activity?
<p>I have two activities, NewTransferMyOwn.java and FromAccount.java</p>

<p>When I go from NewTransferMyOwn.java to FromAccount.java, I do write code as following </p>

<pre><code>Intent i = new Intent(NewTransferMyOwn.this, FromAccount.class);
startActivityForResult(i, FROM_ACCOUNT);
</code></pre>

<p>When I do come back from FromAccount.java to NewTransferMyOwn.java, then I want to pass a complete object of class <strong>Statement</strong></p>

<p>I do write code as </p>

<pre><code>Statement st = ItemArray.get(arg2);//ItemArray is ArrayList&lt;Statement&gt;, arg2 is int
Intent intent = new Intent(FromAccount.this,NewTransferMyOwn.class).putExtra("myCustomerObj",st);
</code></pre>

<p>I do get error as following on putExtra, </p>

<p><strong>Change to 'getIntExtra'</strong></p>

<p>as I do, there is again casting st to int, what is issue over here, how can I pass Statement object towards back to acitivity?</p>
