Object copying in Java
<p>I have a class named as <code>order</code> in <code>package com.abc</code>
I have another class named as <code>order</code> in different package in different project named as <code>com.bcd</code></p>

<p>Both order classes have same code get, set functions and variables with no changes.</p>

<p>Then I have objects</p>

<pre><code>com.abc.order obj1 = new com.abc.order();
com.bcd.order obj2 = new com.bdc.order();
</code></pre>

<p>Now I have to pass arguments to a function and it takes only <code>obj2</code> as parameters
How can I convert type of <code>obj1</code> into type of <code>obj2</code></p>

<p>I cannot change parameters for the function.</p>

<p>Looking forward to your reply.
thanks.</p>
