Java - What is the difference between a break
statement and a continue statement? -Jan 15, 2009 at 8:10 am
by Rajmeet Ghai
What is the difference between a break
statement and a continue statement?
A break statement when applied to a loop ends
the statement. A continue statement ends the iteration of the
current loop and returns the control to the loop statement. If the
break keyword is followed by an identifier that is the label of a
random enclosing statement, execution transfers out of that
enclosing statement. If the continue keyword is followed by an
identifier that is the label of an enclosing loop, execution skips
to the end of that loop instead.
Java What is the difference between a break
statement and a continue statement? - Jan 15, 2009 at 7:10
am by Amit Satpute
The break and the
continue statements are generally used along with a condition, which
when met is executed.
However, a break
statement discontinues the execution of the loop and gets the
control out of the loop after meeting the condition. On the other hand the
continue statement on meeting the condition, goes to the beginning
of the loop and reexecutes it.
Yield method causes the currently executing thread object to
temporarily pause and allow other threads to
Sleep holds the threads execution for the specified time. On the
other hand, yield will cause the thread to rejoin the
An applet is a small server side application that can be loaded
and controlled on the browser by the client
A class is defined as singleton class, if and only if it can
create only one object. This class is useful when only one object is
to be used in the application.............