title: Is there a way to automatically assign all properties in Java?
body: <p>Assume that the <code>User</code> class has a lot of properties that I want to copy to another instance in a copy constructor.  Is there a shortcut way to avoid manually writing an assignment for each field?</p>
  
  <p>For example:</p>
  
  <pre><code>public class User {
      private Integer field1;
      private Integer field2;
      private Integer field3;
      private Integer field4;
      private Integer field5;
      private Integer field6;
      private Integer field7;
      private Integer field8;
      private Integer field9;
      private Integer field10;
      private Integer field11;
      private Integer field12;
      private Integer field13;
      // and more others fields here
  
      public User(User other) {
          this.field1 = other.field1;
          // eleven fields here
          this.field13 = other.field13;
          // and more others fields here
      }
  }
  </code></pre>