Selection Statements in JAVA

 Selection Statements

• Java selection statements allow to control the flow of

program’s execution based upon conditions known

only during run-time.

• Java provides four selection statements:


1) if

2) if-else

3) if-else-if

4) switch


Iteration Statements


• Java iteration statements enable repeated execution of part of a program until a certain termination condition becomes true.

• Java provides three iteration statements:


1) while

2) do-while

3) for


Jump Statements

• Java jump statements enable transfer of control to other parts of program.

• Java provides three jump statements:


1) break

2) continue

3) return


• In addition, Java supports exception handling that can also alter the control flow of a program.



Post a Comment (0)
Previous Post Next Post