Are EXCEPTIONS and RUNTIME errors same things in JAVA? If no, what is the difference? If yes, what is the similarity?
Answers
Answered by
1
No there are not the same thing.
Error in a program is an abnormal condition or a serious problem that cannot be recoveres from and hence not be handled.
The occurence of an error results in termination of program.
Runtime errors are precisely the unforeseen errors which can be identified and results in termination of program.
Like dividing an int value by 0.
Exceptions are abnormal conditions arising during execution of the program from which it may be possible to recover and should be handled by the program before it lets itself terminate.
If exception is handled properly, termination of program does not occur.
Thank u ★ ★ ★
#ckc
Error in a program is an abnormal condition or a serious problem that cannot be recoveres from and hence not be handled.
The occurence of an error results in termination of program.
Runtime errors are precisely the unforeseen errors which can be identified and results in termination of program.
Like dividing an int value by 0.
Exceptions are abnormal conditions arising during execution of the program from which it may be possible to recover and should be handled by the program before it lets itself terminate.
If exception is handled properly, termination of program does not occur.
Thank u ★ ★ ★
#ckc
RishabhRDX:
but dividing a number by 0 is an exception exception as well as a runtime error
Similar questions