Monday, September 28, 2015

Jump Statements

Java supports three jump statements
  • Break
  • Continue
  • Return
These statements transfer control to another part of your program.
NOTE
In addition to the jump statements discussed here, Java supports one other way that you can change your program’s flow of execution: through exception handling. Exception handling provides a structured method by which run-time errors can be trapped and handled by your program. It is supported by the keywords try, catch, throw, throws, and finally. In essence, the exception handling mechanism allows your program to perform a non-local branch.

No comments:

Post a Comment

If you have any query please comment here, Will get back to you :)