Naming a for loop in java

for(int i = 0; i<10; i++)
{
loopName: for(Organization org: organizations)
{
if(org.getId() .equals( new Long("5")))
break loopName;
}
//do other stuff

}


http://www.informit.com/library/content.aspx?b=STY_Java2_24hours&seqNum=96

No comments:

Post a Comment