Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

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:

©2025 WithoutBook