title: Change values in object java
body: <p>I have 2 objects in Java, person1 and person2. With a event button in the code I say that person2 = person1, then I need to change the age of person 1 without change person2.</p>
  
  <pre><code>Person objperson1 = new Person();
  objperson1.setAge(30);
  Person objperson2 = new Person();
  objperson2 = objperson1;
  objperson1.setAge(40);
  System.out.println(objperson2.getAge()); //console print 40. I need it print 30
  </code></pre>