title: new Object { } Construct
body: <p>In Java, the standard way to create an object is using </p>
  
  <pre><code>MyClass name = new MyClass();
  </code></pre>
  
  <p>I also often see the construct</p>
  
  <pre><code>new MyClass() { /*stuff goes in here*/ };
  </code></pre>
  
  <p>I've been looking online for a while and can't find a good explanation of what the second construct style does or how it does it.</p>
  
  <p>Can someone please explain how and why you would use the second construct?</p>