|
-
Aug 14th, 2006, 06:45 AM
#1
Thread Starter
PowerPoster
[RESOLVED] What is a " label "?
Hi ….
Can you explain what is a label, which is used with loops, with the following example?
I found it from a book. But still can't understand this code.
boolean found = false;
outer: for(int row=0; row<10; row++)
{
inner: for(int col=0; col<10; col++)
{ // some code which may change found to true
if(found)
{
break outer; // jumps to outer loop
}}}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|