title: Method calls inside a Java class return an "identifier expected after this token" error
body: <p>When I write the following code in Eclipse:</p>
  <pre><code>public class MyClass {
      System.currentTimeMillis();
  }
  </code></pre>
  <p>I get this compile error:</p>
  <blockquote>
  <p>Syntax error on token &quot;currentTimeMillis&quot;, Identifier expected after this token</p>
  </blockquote>
  <p>It works if I change that statement to an assignment statement:</p>
  <pre><code>long time = System.currentTimeMillis();
  </code></pre>
  <p>Of course, it doesn't cause errors if placed inside a method body or within blocks inside the class body.</p>
  <p>Why is this? Is there some compiler level rule that says that only assignment statements or declarations should be present inside the class body?</p>