Ask a Question    Search Answers  

Category
Computers >> Programming Concepts >> Java

Question
What does break and continue statements do?  (1 answers) Posted by: venkatreddy04   Ask a Friend

Answers
1.

Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.

In Loop,when Break statement occurs then control breaks the loop & comes outside of loop
and when continue statement occurs then control skips further statements and goes for next itteration.
    Answered by: nvreddy


    Add an Answer to this Question
    Add a New Question
    Notify updates to this question
    Mail to a Friend
Rate this answer:       Exact       Correct       somewhat correct       wrong       spam

User comments


  What environment variables do I need to set on my machine in order to be able to run Java programs?
  Can a public class MyClass be defined in a source file named YourClass.java? ?
  What will be the default values of all the elements of an array defined as an instance variable?
  What is the difference between static and non-static variables?
  How does Java handle integer overflows and underflows?
  What is synchronization and why is it important?
  How do I dynamically disable/ enable form elements using JavaScript?
  How do I manipulate radio and check boxes in JavaScript?
  How do I validating forms using JavaScript?
  How do I access forms using JavaScript?
  How do I add a link to print only one part of a web page?
  How do I add a print button to a web page?
  Which features of the browser window can I control from JavaScript, and when?
  How can I delete a cookie with JSP?
Add New Question
Glossary
Add Glossary
 
Copyright © 2009-10 Krify Software Technologies Pvt Ltd. All rights reserved.