break statement

Category: Java SE
 
xrml3571
2012-02-08 03:36:36

Sponsored Links
My dear friend, who can tell me how to use the break statement
I mean without a label with a label and when in the end how to use?

Sponsored Links

seleone
2012-02-08 03:46:42
without a label will jump for, while, do loops, many beginners will if it counted, but this is wrong. Like when a label with basic, which marked jump which, though rarely so write a good program.

switch in addition to the frequent use of break outside
switch (i) {
case 1:
;/ / your code
break;
case 2:
/ / another code
break;
.....
default:
/ / some code
}

loop is also commonly used to force out break to speed up
language88
2012-02-08 03:55:03
represents good is to jump directly on behalf of label at.
unlabeled just jump outside the loop layer closest
abcdefghijkln1234
2012-02-08 03:58:02
Thank you, thank you for teaching
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.