Question: 1) The if statement is used to implement a decision. The simplest form of an if statement has two parts: a condition and a body.

1) The if statement is used to implement a decision. The simplest form of an if statement has two parts: a condition and a body. If the condition is true, the body of the statement is executed. The body of the if statement consists of a statement block. Consider the following code: if (n > 10) { System.out.print("*****"); if (n >7) { System.out.print("****\"); if (n > 4) { SYStem-OUt.print("***"); 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
