title: Comparing field values using reflection
body: <p>I am trying to compare the field values of two different objects in a generic way. I have a function (seen below) that takes in two Objects and then gets the fields and then compares the fields in a loop and adds the fields to a list if they are not the same - is this the proper way to do this?</p>
  
  <pre><code>public void compareFields(Object qa, Object qa4) throws FieldsNotEqualException
  {
  
    Field[] qaFields = qa.getClass().getFields();
    Field[] qa4Fields = qa4.getClass().getFields();
  
    for(Field f:qaFields) 
    { 
  
      for(Field f4:qa4Fields)
      {
         if(f4.equals(f))
         {
             found = true;
             break;
         }
         else
         {
             continue;
         }
      }
    }
  
   if(!found)
   {
      report.add(/*some_formatted_string*/) //some global list 
      throw new FieldsNotEqualException();
   }
  }
  </code></pre>
  
  <p>I was googling and I saw that C# had like a PropertyInfo Class - does Java have anything like that?
  ALSO, is there a way to do like <code>f.getFieldValue()</code> -I know there is no method like this but maybe there is another way???</p>