title: Displaying Field type with Java reflection
body: <p>I am using reflection in Java.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>  public String getClassFields(Class aClass)
    {
    String ClassFields = "";
    Field[] Fields = aClass.getDeclaredFields();
    boolean isPublic;
    String separator = System.getProperty( "line.separator" );
    for (Field f : Fields) 
    {
      isPublic = Modifier.isPublic(f.getModifiers());
      if (isPublic)
          ClassFields += "public " + f.getType() + " " + f.getName() + separator;
      else
          ClassFields += "private " + f.getType() + " " + f.getName() + separator;
    }    
    return ClassFields;
  </code></pre>
  
  <p>}</p>
  
  <p>If the fields in the Class are as follows:</p>
  
  <pre><code>private int Diameter;
  private Colour Colour;
  </code></pre>
  
  <p>The code I have posted above returns the following:</p>
  
  <pre><code>private int Diameter
  private class Colour Colour
  </code></pre>
  
  <p>How can I modify my code to remove the additional 'class' word from the line:</p>
  
  <pre><code>private class Colour Colour
  </code></pre>