Understanding syntax in Java
<p>I can see in couple of examples on the web a new syntax for me, here's an example:</p>

<pre><code>Accumulator&lt;Integer&gt; sum = new Accumulator&lt;Integer&gt;(){
    public Integer accumulate(Integer t1, Integer t2) {
    return t1+t2;
     }
  };
</code></pre>

<p>In general, what does that mean when one writes <code>{ a method }</code> after making an instance of a class? Is it some kind of old syntax for something?</p>

<p>Thanks </p>
