title: Why does Eclipse require me to set (arbitrary) brackets in java code?
body: <p>I am currently trying to figure out how to use Eclipse to program Escape models in java. I am quite new to Escape and Eclipse, and it has been a while since I programmed in java, so please excuse if this is a stupid question. </p>
  
  <p>Basically, I have been haunted by strange Eclipse error messages. I tracked the last one down to this problem:</p>
  
  <p>This works:</p>
  
  <pre><code>public class CoordinationGame extends Scape {
  
  .
      .
      .
      Scape lattice;
  
  boolean test;
  int test2;
  
  {
  test = true;
  test2 = 3;
  }
  
  {
  lattice = new Scape(new Array2DVonNeumann());
  }
  
  }
  </code></pre>
  
  <p>This gives strange error messages:</p>
  
  <pre><code>public class CoordinationGame extends Scape {
  
      .
  .
  .
  
  Scape lattice;
  
  boolean test;
  int test2;
  
  test = true;
  test2 = 3;
  
  lattice = new Scape(new Array2DVonNeumann());
  }
  </code></pre>
  
  <p>i.e. <code>{</code> expected afer <code>int test2</code> and <code>Syntax error on token "lattice", VariableDeclaratorId expected after this token</code>.</p>
  
  <p>As I said, Java has been some time, but IIRC, those brackets should not be required. <a href="https://stackoverflow.com/questions/4441275/in-java-why-have-a-code-block-with-no-keywords-just-curly-brackets">This question</a> establishes that this bracket usage is an initializing block, but this is probably not what I want to do here.</p>
  
  <p>Does anyone know why Eclipse requires me to set these brackets, or what I could do to change this behaviour?</p>
  
  <p>Thanks in advance!
  Martin</p>
  
  <p>PS: Some information that will probably be useful:</p>
  
  <p>I use eclipse-indigo, installed the modelling toolkit AMP. I am not entirely sure how to check this, but I believe I am using jre6, as this is what it says in the JRE System Library tab of my package explorer. In the future, I plan to find a way to run the Escape modelling environment with Groovy, but that will be another question …</p>