title: java compare objects: using reflection?
body: <p>I have an object which itself has multiple objects as fields. The question I have is, I have two objects of these kind and I want to compare these two. I know I can do equals, comparator etc. but is there a way to use reflection to get the properties of the object and make comparison. </p>
  
  <p>for example, if I have a Car object, which as wheels object, which has tires object, which has bolts object. Please remember all the above objects are individual and not nested classes. How do I compare 2 car objects? </p>
  
  <p>Any help is appreciated?</p>
  
  <p>Thanks</p>