title: Java - Convert classes
body: <p>I have 2 classes:</p>
  <pre><code>public class Customer {
      private String firstname;
      private String lastname;
  }
  </code></pre>
  <p>and</p>
  <pre><code>public class Buyer {
      private String firstname;
      private String lastname;
  }
  </code></pre>
  <p>I want both classes to convert to a the following class:</p>
  <pre><code>public class CustomerDTO {
     private String firstname;
     private String lastname;
  }
  </code></pre>
  <p>I cannot use a common interface for the classes or something. Is there a way I can convert Customer and Buyer both to a Customer DTO class with a single converter class?</p>