By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

break

P: n/a
how do i break out of an entire method (void return type)?

i have a loop that, under certain conditions, must contain some sort of
method termination (assignment).

does a 'break;' statement break out of the entire method, or just the loop?

thanks for any consideration
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Robot Tree" <ye******@netscape.net> wrote in message
news:JHwXb.45568$Ii2.26356@lakeread03...
how do i break out of an entire method (void return type)?

i have a loop that, under certain conditions, must contain some sort of
method termination (assignment).

does a 'break;' statement break out of the entire method, or just the loop?
thanks for any consideration


return;

Some companies do not allow the use of multiple points of return from a
method (except, of course, for exception handling) by convention.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)
Jul 17 '05 #2

P: n/a

"Tony Morris" <di******@optusnet.com.au> wrote in message
news:40***********************@news.optusnet.com.a u...
"Robot Tree" <ye******@netscape.net> wrote in message
news:JHwXb.45568$Ii2.26356@lakeread03...
how do i break out of an entire method (void return type)?

i have a loop that, under certain conditions, must contain some sort of
method termination (assignment).

does a 'break;' statement break out of the entire method, or just the

loop?

thanks for any consideration


return;

Some companies do not allow the use of multiple points of return from a
method (except, of course, for exception handling) by convention.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)


problem solved.
thank you, tony
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.