Mistake or error often occurs when creating the program, this upset the novice programmer to avoid the mistakes or errors of Java provides facilities such as exception handling mechanism. Can be said that the Exception is an acronym for Exceptional Events or in the Indonesian language mistakes (errors) that occur during manufacture of the program and at runtime, resulting in interference with the flow exekusi. This is one way of exception handling, just look at the code :
Code Program :
Output Program:
Exception if user input 0:
0 komentar:
Posting Komentar