Original http://blog.csdn.net/moonwalkings/article/details/4631988
CodeAs follows:
[Java] View plaincopyprint?
- Public ClassH
- {
- Public Static VoidMain (string [] ARGs ){
- {
- Back:For(IntI =0; I <10; I ++ ){
- If(I =9)
- {System. Out. println ("Break");
- BreakBack;
- }
- }
- System. Out. println ("Test");}
- }
- }
The appeal code runs as follows:
Break
Test
Another example is code:
[C-sharp] View plaincopyprint?
- Public ClassH
- {
- Public Static VoidMain (string [] ARGs ){
- Back :{
- For(IntI = 0; I <10; I ++ ){
- If(I = 9)
- {System.Out. Println ("Break");
- BreakBack;
- }
- }
- System.Out. Println ("Test");}
- }
- }
Public Class H <br/>{< br/> Public static void main (string [] ARGs) {<br/> back: {<br/> for (INT I = 0; I <10; I ++) {<br/> if (I = 9) <br/> {system. out. println ("break"); <br/> Break back; <br/>}< br/> system. out. println ("test") ;}< br/>}< br/>}
The running result is:
Break
No test !!
The tagged break is the "airspace" managed by the place indicated by the exit tag, and will not be re-executed from the place indicated by the tag. Therefore, the Appeal code will not start an infinite endless loop from the referred.