Thread: goto statement
View Single Post
  #2 (permalink)  
Old 12-12-2007, 03:19 PM
wsaryada wsaryada is offline
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 102
wsaryada is on a distinguished road
It would be better if you can design your program so it not need to use a goto statement because it was considered not as a good practice in programming.

Although goto is a reserved word in Java it is not used in the Java language. But there is a label, an identifier that can be used in conjunction with the break or continue. The purpose of the label it to let an iteration to jump outside of the iteration, it is a bit like goto statement.

Code:
labelA: // some loop { continue labelA; }
__________________
Website:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote