title: How to write main() in an OOP way?
body: <p>When I first started programming, I wrote everything in main. But as I learned, I tried to do as little as possible in my <code>main()</code> methods.</p>
  
  <p>But where do you decide to give the other Class/Method the responsibility to take over the program from <code>main()</code>? How do you do it?</p>
  
  <p>I've seen many ways of doing it, like this:</p>
  
  <pre><code>class Main
  {
    public static void main(String[] args)
    {
      new Main();
    }
  }
  </code></pre>
  
  <p>and some like:</p>
  
  <pre><code>class Main {
  
     public static void main(String[] args) {
  
      GetOpt.parse(args);
  
      // Decide what to do based on the arguments passed
      Database.initialize();
      MyAwesomeLogicManager.initialize();
      // And main waits for all others to end or shutdown signal to kill all threads.
    }
  }
  </code></pre>
  
  <p>What should and should not be done in <code>main()</code>? Or are there no silver bullets?</p>
  
  <p>Thanks for the time!</p>