Explain break statement and continue statement?

Answers were Sorted based on User's Feedback



Explain break statement and continue statement?..

Answer / ranganathkini

The break statement exits the loop execution and starts
executing the statement just after the loop.

The continue statement stops executing the rest of the
current iteration and starts the next iteration.

Is This Answer Correct ?    26 Yes 4 No

Explain break statement and continue statement?..

Answer / shambhu kumar

The break keyword halts the execution of the current loop
and forces control out of the loop.

The continue is similar to break, except that instead of
halting the execution of the loop, it starts the next
iteration.

Is This Answer Correct ?    16 Yes 2 No

Explain break statement and continue statement?..

Answer / ravikiran(aptech mumbai)

break statement will through you out of the loop.
where as continue will aboandon the current iteration and
will make you to continue with next iteration

Is This Answer Correct ?    10 Yes 2 No

Post New Answer

More Core Java Interview Questions

What are the differences between c++ and java?

0 Answers  


What is operator overloading. Is it is supported in java?

0 Answers  


Is null function in java?

0 Answers  


What should I import for arraylist in java?

0 Answers  


What are memory tables?

0 Answers   Aspiring Minds,






What are interfaces?

3 Answers  


is it mandatory to deaclare all variables public static fianl in interfaces?if i declare like in the below program, public interface A { public static final int I=0; int j=0; } in interface A,what is the difference between I,j?

2 Answers  


Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>

12 Answers   Accenture, CTS, Extensio, IBM, iFlex, PA Consulting, Symphony, Tarang,


What is the default initialized value of String type variable?

4 Answers  


What are non-access modifiers?

2 Answers   Cognizant,


Is null an object java?

0 Answers  


What is javac used for?

0 Answers  


Categories