Java statements

Java statements

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

October 27, 2010 at 12:55 PM

Hi,

Here is the answer,

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.

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,end the current loop iteration and return control to the loop statement.

Thanks.









Related Tutorials/Questions & Answers:
java statements
java statements  What is the difference between an if statement and a switch statement
Java statements
Java statements  What is the difference between a break statement and a continue statement
Advertisements
Java statements
Java statements   What is the difference between a break statement and a continue statement
Java statements
Java statements  What if there is a break or return statement in try block followed by finally block
Avoiding â??!= nullâ?? statements in Java?
Avoiding â??!= nullâ?? statements in Java?  Avoiding â??!= nullâ?? statements in Java
java program using control statements...
java program using control statements...  public class ControlStatements { public static void main(String args[]){ int x=10; if(x==0){ System.out.println("It is zero"); else if(x>0) System.out.println
Statements in JDBC - Java Interview Questions
Statements in JDBC  Hi, Explain statement, preparedstatement, callable statement. which is best and why. when to use preparedstatement. plz dont give link . explain ur words with example
Control Flow Statements in java 7
Control Flow Statements in java 7 In this section we will discuss Control Flow Statements in java 7. This is one type of Language Fundamentals. Control Flow Statements : - In general program execution flow is from top to bottom
Executing Set of SQL statements in Java
Executing Set of SQL statements in Java  Hi, I am trying to execute a procedure which is stored in MS SQL server's database. I have configured...= cstmt.executeQuery(); The procedure has drop temp table statements, select multiple
java conrolling statements - Java Beginners
java conrolling statements  write a Java program to accept 10 integers and print the sum of numbers divisible by 5
Looping Statements in java 7
Looping Statements in java 7 In this section, we will discuss about Looping Statements in java 7. This is one type of control flow statement. Looping Statements : This kind of statements are used where you need to execute block
Branching Statements in java 7
Branching Statements in java 7 In this section, we will discuss about Branching Statements in java 7. This is one type of control flow statement. Branching Statements : Branching statements are categorize in the following types : ADS
Java Control Statements
Java Control Statements      ... if The if statement: To start with controlling statements in Java, lets have a recap over... in Java.    Loop Statements while
Expressions, Statements, and Blocks in java 7
In this section we will discuss expressions, Statements and Blocks in java 7. This is one type of Language Fundamentals
Decision-making Statements in java 7
Decision-making Statements in java 7 In this section, we will discuss about Decision-making Statements in java 7. This is one type of control flow statement. Decision-making Statements : This kind of control statements is used where
Java Control Statements
Java Control Statements     ... and the conditional logic. Java contains the following types of control statements:ADS... the control statements. Different types of control statements: the decision making
predicates and statements?
predicates and statements?  Explain about predicates and statements
DECESION MAKING STATEMENTS
DECESION MAKING STATEMENTS  The Decision Making statements may be implemented in different forms depending on the complexity of the condition to be tested. Describe various forms of decision making statements in java
The INSERT INTO Statements in SQL?
The INSERT INTO Statements in SQL?  The INSERT INTO Statements in SQL?   Hi, The INSERT INTO statement is used to insert a new row or multiple rows into a table.ADS_TO_REPLACE_1 SQL INSERT INTO Syntax INSERT
general syntax for a SELECT statements
general syntax for a SELECT statements  Write down the general syntax for a SELECT statements covering all the options   Hi, The general..._TO_REPLACE_1 this syntax shows how we can use different optin with the select statements
What is the Delete Statements in SQL?
What is the Delete Statements in SQL?  What is the Delete Statements in SQL?   Hi, Here is the answer,ADS_TO_REPLACE_1 Delete statement in SQL is used to delete partial/all data. Especially delete statement is useful
ModuleNotFoundError: No module named 'flake8-if-statements'
ModuleNotFoundError: No module named 'flake8-if-statements'  Hi...: No module named 'flake8-if-statements' How to remove the ModuleNotFoundError: No module named 'flake8-if-statements' error? Thanks   Hi
ModuleNotFoundError: No module named 'flake8-if-statements'
ModuleNotFoundError: No module named 'flake8-if-statements'  Hi...: No module named 'flake8-if-statements' How to remove the ModuleNotFoundError: No module named 'flake8-if-statements' error? Thanks   Hi
netbeans ddl and dml sql statements - Java Beginners
Hibernate generated SQL statements on console
Hibernate generated SQL statements on console  If you want to see the Hibernate generated SQL statements on console, what should we do?   If you want to see the Hibernate generated SQL statements on console just add
loop, control statements
loop, control statements  a java program to print
Objective C if else statements syntax
Objective C if else statements syntax  What is the syntax of if else statements in Objective C?   Using of if else statement in Objective C There is no changes in the syntax format of if else statement. You can write
ModuleNotFoundError: No module named 'financial-statements-downloader'
ModuleNotFoundError: No module named 'financial-statements-downloader' ...: ModuleNotFoundError: No module named 'financial-statements-downloader' How to remove the ModuleNotFoundError: No module named 'financial-statements-downloader' error
Show Hibernate generated SQL statements on console
Show Hibernate generated SQL statements on console  How can i see Hibernate generated SQL statements on console?   In Hibernate configuration file add the following: <property name="show_sql">true</property>
executing multiple sql statements on the single button click...
executing multiple sql statements on the single button click...  how can i frame a code on the click of a button to insert data into a table as well as to retrieve records from the same table in another form
executing multiple sql statements on the single button click...
executing multiple sql statements on the single button click...  how can i frame a code on the click of a button to insert data into a table as well as to retrieve records from the same table in another form
MySQL Transactional and Locking Statements
MySQL Transactional and Locking Statements  ... by statements like START TRANSACTION, SET AUTOCOMMIT, COMMIT and ROLLBACK. Transaction means a group of SQL Statements, which executes as a unit. And MySQL either
Which of the following statements are true with respect to binary search
Which of the following statements are true with respect to binary search  Which of the following statements are true with respect to binary search? 1. The array need not be sorted for carrying out binary search 2. Binary search
Why we use Semicolon after SQL Statements?
Why we use Semicolon after SQL Statements?  Why we use Semicolon after SQL Statements?   Hi, Some database systems require a semicolon at the end of each SQL statement.The semicolon character is a statement
Jdbc statements
Jdbc statements
loop statements
if/else statements
JavaScript Conditional Statements
for this purpose. JavaScript Conditioanl Statements Example 1(if):ADS_TO_REPLACE_1 <
Understanding Common SQL statements
Understanding Common SQL statements       The commonly used SQL statements are: 1): Select 2): Insert 3): Update 4): Delete ADS
JDBC: Insert Record using Prepared Statements
JDBC: Insert Record using Prepared Statements In this section, you will learn how to insert row using Prepared Statements. Insert Record  ... times for different values. It is precompiled SQL Statements which are stored
Any specific log4j statements for Hibernate Envers for showing the Envers related errors
Any specific log4j statements for Hibernate Envers for showing the Envers... are not coming in console. We had the following statements in log4j... Is there any specific log4j statements for Hibernate Envers
Switch Case in Java
. Switch statements with String cases are supported in Java SE 7 but the earlier version of Java did not support String in switch/case. Switch statements works... if-then and if-then-else statements. As switch statement allows in-numerous possible execution paths
Iterating Statements of RDF file in Java
Iterating Statements of RDF file in Java       Each and every arc in RDF Model represents... called triple (Subject,Predicate,Object). To iterate RDF model statements we need
Java Break command
Java Break command       Java Break command is commonly used in terminating looping statements. break command comes under the Java branching statements category. In programming
Java if else
Java if else       The if-else statement is one of the widely used control flow statements while programming. It lets the program execute a set of statements enclosed within the "
Identify correct and incorrect statements or examples about EJB programming restrictions.
Identify correct and incorrect statements or examples about EJB... Overview Next     Identify correct and incorrect statements... that the security rules of the Java programming language make unavailable. ADS
Identify correct and incorrect statements or examples about the purpose and use of EJB QL.
Identify correct and incorrect statements or examples about the purpose and use of EJB QL. Prev Chapter 9. EJB-QL Next    Identify correct and incorrect statements
Java Break Statement
Java Break Statement       'break' statement comes under the branching statements category of java. It is used to terminate the loop coded inside the program.  Example
creating jdbc sql statements - JDBC

Ads