Java supports two selection statements -
if and switch . These statements allow us to control the flow of the program. Depending upon the expressions or values, the corresponding blocks/statements of code will be executed or by passed.
The two statements are
These two statements are very powerful and are used widely across any application. They provide effective solutions for branching problems.
|