how to work around system.exit in java code example Example: how to exit a java program System.exit(0);