Briefly explain the purpose for using selection statements in a Java program. Briefly explain a reason for using a while loop in a Java program.
Briefly explain the purpose for using selection statements in a Java

selection statements-
Selection statements in Java are also referred to as decision-making statements and conditional statements. They are utilized to decide which section of the program will run based on a condition. They enable a program's execution to take one of two or more possible routes.
Selection statements are frequently used to allow a program to process input in an appropriate manner. Selection statements evaluate conditions and, depending on the result, induce the execution of a different set of instructions (selected).
It consists of-
1. if
2. else if
3. nested if else
4. switch statements
Step by step
Solved in 2 steps









