title: What is the difference between Runtime.exit(0) and System.exit(0) in Java?
body: <p>What is the difference between </p>
  
  <blockquote>
    <p>Runtime.exit(0) and System.exit(0)</p>
  </blockquote>
  
  <p>Similarly what is the difference between </p>
  
  <blockquote>
    <p>Runtime.gc() and System.gc()</p>
  </blockquote>
  
  <p>When to use which?</p>