when we use System.exit() in java code then which threads get's terminated ? code example Example: java exit System.exit(0);