Question: Write a reply to The main difference between a break and continue statement in Java is a break statement, when inserted into to a loop,
Write a reply to "The main difference between a break and continue statement in Java is a break statement, when inserted into to a loop, means the loop will stop at that point before the loop finishes if the proper conditions are met. A continue statement on the other only skips part of a loop if the proper conditions are met. A continue statement does not stop the loop. Another difference between the two is that a break can be used inside of a switch statement, while a continue statement cannot.
If ifelse statement is a form of loop. The purpose of the ifelse statement is to be able to execute different blocks of code based off the initial conditions or user input. For example: If number of Pepsi in fridge is advise owner he needs more Pepsi; else if number of Pepsi in fridge advise owner nothing needed. Although that's a very simple explanation if get the point across. If there are a multitude of conditions that need to be gone through based off the user input, then multiple elseif statements can be used."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
