Question: What is the difference between 'System.exit(0)' and throwing an exception?Answer: 'System.exit(0)' terminates the Java Virtual Machine, while throwing an exception allows for a controlled termination of a specific part of the program. |
Is it helpful?
Yes
No
Most helpful rated by users: