title: IIFE/Automatic Method in Java?
body: <p>I know that there is a way to have a method to run automatically in java?. This is known as an IIFE in javascript, but is this possible in java?</p>
  
  <p>Javascript IIFE:</p>
  
  <pre><code>(function() {
      console.log('Hello!');    
  })();
  </code></pre>
  
  <p>Thank You! (I'm also just curious)</p>