Archive

Posts Tagged ‘Java-Statement’

Understand Java break and continue Statements

January 19th, 2009 No comments

Let’s get it right and understand on usage of break and continue Statements in Java Programming Language.

break Statement

This statement causes iteration to stop/exit immediately, any line remained after this statement will be ignored by the JVM.

It is used in the following loop

  • for
  • while
  • do…while
  • switch

continue Statement

This statement skips the current iteration of the loop, any line after this statement will not be executed by the JVM until the condition is met.
Read more…

Categories: Programming