Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners What is the difference between a break statement and a continue statement?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
What is the difference between a break statement and a continue statement?
1 Answer(s)      a year and 8 months ago
Posted in : Java Beginners


Hi,

What is the difference between a break statement and a continue statement?

Thanks,


Advertisement
View Answers

April 17, 2013 at 12:07 PM


Hello,

In Java programming language supports 3 types of controlling statements such as: break statement, continue statement and return statement etc.

Other-then Java programming language the break statement is used in other programming languages such as C, C++. In case we want to exit from a loop before the completion of the loop program we uses the break statement and exit from the loop and loop is terminated. Sometimes we do not need to execute some statements under the loop then we use the continue statement that stops the normal flow of the control and control returns to the loop without executing the statements written after the continue statement.

For clear idea about the Break statement and continue statement visit this link:

http://www.roseindia.net/java/beginners/break.shtml

http://www.roseindia.net/java/beginners/continue.shtml

http://www.roseindia.net/java/jdk7/BreakStatement.shtml

Thanks,



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com