Copy object to another object java
<p>I have an object A that contais for example:</p>

<pre><code>class A{
    String elem1;
    Int elem2;
    ...get and set 
}
</code></pre>

<p>and i have a class B that contains same element and name of field:</p>

<pre><code>class B{
    String elem1;
    Int elem2;
    ...get and set 
}
</code></pre>

<p>i want copy class A value into class B value without modify the class. 
How can solve? thanks.</p>
