title: Uncompilable source code - illegal start of expression
body: <p>I'm getting an error at public double temperature. Any help is greatly appreciated. I googled and still can't find the error in my code. I'm sure the problem should be quite trivial.</p>
  
  <pre><code>   package temperature;
  
  /**
   *
   * @author Logan
   */
  
  public class Temperature
  {
      public static void main(String[] args)
  {
  // Use a floating-point number for the temperature and a character for the scale: either 'C' for Celsius or 'F' for Fahrenheit. T
  public double temperature;
  private char scale;
  
  // Four constructors: one for the number of degrees, one for the scale, one for both the degrees and the scale, and a default constructor. For each of these constructors, assume zero degrees if no value is specified and Celsius if no scale is given.
  public Temperature()
  {
  this(0.0, 'C');
  }
  public Temperature(double temp)
  {
  this(temp, 'C');
  }
  public Temperature(char scale)
  {
  this(0.0, scale);
  }
  public Temperature(double temp, char s)
  {
  temperature = temp;
  scale = s;
  }
  
  // Two accessor methods: one to return the temperature in degrees Celsius,the other to return it in degrees Fahrenheit. Use the following formulas:
  // Degrees_C = 5 (Degrees_F - 32) / 9
  // Degrees_F = (9 (Degrees_C) / 5) + 32
  // and round to the nearest tenth of a degree.
  public double getDegreesF()
  {
  if(scale == 'F')
  {
  return round(temperature);
  }
  else
  {
  return round(9*temperature/5+32);
  }
  }
  public double getDegreesC()
  {
  if(scale == 'C')
  {
  return round(temperature);
  }
  else
  {
  return round(5*(temperature-32)/9);
  }
  }
  private double round(double input)
  {
  return (double)(((int)(input*10))/10.0);
  }
  
  // Three set methods: one to set the number of degrees, one to set the scale, and one to set both.
  public void setDegrees(double temp)
  {
  temperature = temp;
  }
  public void setScale(char s)
  {
  scale = s;
  }
  public void setTemperature(double temp, char scale)
  {
  setDegrees(temp);
  setScale(scale);
  }
  
  // Three comparison methods: one to test whether two temperatures are equal, one to test whether one temperature is greater than another, and one to test whether one temperature is less than another.
  public boolean isEqualTo(Temperature rhs)
  {
  return rhs.getDegreesC() == getDegreesC();
  }
  public boolean isLessThan(Temperature rhs)
  {
  return rhs.getDegreesC() &gt; getDegreesC();
  }
  public boolean isGreaterThan(Temperature rhs)
  {
  return rhs.getDegreesC() &lt; getDegreesC();
  }
  }
  </code></pre>
  
  <p>I'm getting an error at public double temperature. Any help is greatly appreciated. I googled and still can't find the error in my code. </p>