Break Keyword in Java

Compiled By Unknown - No Comments
The break keyword is used to prematurely exit a for, while, or do loop or to mark the end of a case block in a switch statement.
Examples
for (i=0; i)
{
break;
}
}
int type = ;
switch (type)
{
case 1:

break;
case 2:

break;
default:

}

Remarks Break Keyword in Java
  • break always exits the innermost enclosing while, for, do or switch statement.

  • Tags:

    No Comment to " Break Keyword in Java "