title: Compare object fields of different classes in Java
body: <p>I have two objects, each of which have tens of fields:</p>
  
  <pre><code>Class1 {
      int firstProperty;
      String secondProperty;
      ...
  }
  
  Class2 {
      int propertyOne;
      String propertyTwo;
      ...
  }
  </code></pre>
  
  <p>Although the some field are different in name, but they should have same meaning and purpose, for example <code>firstProperty</code> and <code>propertyOne</code>. I want to compare if the "similar" fields of objects of the two class actually have same values.
  What is the most elegant way to do this? </p>