+ 2
What is exception handling in Java
What is try, catch, throw, final and throws.
2 Answers
+ 4
Programming languages raise exceptions (errors) because it is sometimes the safest choise, raise an error, terminate the program and let the programmer fix the error.
With exception handling you can stop the program from terminating itself when an error occurs.
try:
try keyword is used when the following code block has a risk to raise an error.
catch:
catch keyword is used after try, and executed when try raises an error stopping program from terminating itself.
throw:
throw keyword is used to cause an extra error.
final:
final keyword is used to make variables constant.
+ 4
There is a section about this in your tutorial, please read it again and try it on your own.
If you still don't understand, ask here what *exactly* you don't understand.
Otherwise we'll likely just repeat what's in the tutorial and you're none the wiser and q&a that much bulkier.