For which statements does it make sense to use a label

The only statements for which it makes sense to use a label are those statements that canenclose a break or continue statement.

Showing Answers 1 - 1 of 1 Answers

sharmawithu

  • Aug 27th, 2011
 

A label is used to recognize particular area where we need to keep the break.

Example: Suppose in one area you are expecting an exception then you'll keep the break then after that particular functionality you'll give continue the execution starts from there. so the tool wont go into break and from the continue the exection will starts. so a label is used to find where we have to inset the break.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions