title: Class compiler error: identifier expected
body: <p>I have to write a very simple class so that I can write an object. Originally, my code looked like this: </p>
  
  <pre><code>public class Pie{
      String flavour;
      String type;
      String size;    
  }
  </code></pre>
  
  <p>But when I tried to compile I got 2 errors: <code>identifier expected</code> and <code>';' expected</code>.</p>
  
  <p>Then I added the main method. So the code looked like this:</p>
  
  <pre><code>public class Pie{
      public static void main(String[] args){
          String flavour;
          String type;
          String size;    
      }
  }
  </code></pre>
  
  <p>And it's still giving me the same errors! Why? </p>