title: Comparing Two Pojo List for changes
body: <p>I have two Pojo Classes
  <code>DriverPrimary</code>, <code>DriverSecondary</code></p>
  <p>I am comparing Driver Primary with driver secondary and if there are any changes I need to find that out</p>
  <p>Can you please let me know how it is done?</p>
  <p>DriverPrimary.java</p>
  <pre><code>public class DriverPrimary implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      private String DriverId;
      private String role;
  
      
  }
  </code></pre>
  <p>DriverSecondary.java</p>
  <pre><code>public class DriverSecondary{
  
      private String driverSecondaryDriverType;
      private String driverSecondaryDriverId;
  
  }
  </code></pre>
  <pre><code>   List&lt;DriverPrimary&gt; driverPrimary = new ArrayList&lt;DriverPrimary&gt;();
     List&lt;DriverSecondary&gt; driverSecondary = new ArrayList&lt;DriverSecondary&gt;();
  
  driverPrimary=DataEBO.getDriverPrimary();// from datasource which is not empty and has values
  driverSecondary=DataDTO.getDriverSecondary();// from datasource which is not empty and has values
  
  </code></pre>
  <p>SO how to compare the above two list, though the field names are different both have similar values</p>
  <p>Edited:
  Removed Equals and hashcode has that will work with class with same structure.
  Edit2: modified the code for better understanding</p>