title: What are the differences between calling System.exit(0) and Thread.currentThread().interrupt() in the main thread of a Java program?
body: <p>Both cause a program to stop executing. It's clear that there must be some differences in how this happens, though. What are they?</p>