How do I close a java application from the code

Ben picture Ben · Aug 3, 2011 · Viewed 35.7k times · Source

How do you close a java application from the code?

Answer

João Silva picture João Silva · Aug 3, 2011

You call System.exit:

System.exit(0);