• Post Reply Bookmark Topic Watch Topic
  • New Topic

which break statement doulh I use  RSS feed

 
kumarjit banerjee
Ranch Hand
Posts: 32
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I want to know in this situation which break statement will be ideal. For the labelled break statement, as I know is inferior because it acts somewhat like goto statement in other languages. May be I am wrong, both may perform the same way. Please correct me.
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not so much a case of which you should use as which of the two is worse . . .It is never necessary to use break, except after switch-case.


And I know lots of people will disagree with me
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!