title: The best way to keep the main method running
body: <p>I used a way to keep the main method running.</p>
  
  <pre><code>public static void main(String[] args) throws InterruptedException {
      while (true) {
          TimeUnit.SECONDS.sleep(1);
      }
  }
  </code></pre>
  
  <p>But I'm not sure it's the best way.</p>
  
  <p>Can someone give me some advice?</p>