Explain the use of if control structure.
33 Likes
The if control structure is used to execute a statement or block of statements if the condition is true, otherwise it ignores the condition. The general syntax of if statement is as follows:
if (Boolean expression) { //Java statements .. .. }
Answered By
18 Likes
Explain the switch statement with an example.
What is the importance of break and default statements in switch?
Give one difference between while and do while loop.
What are the unique features of for loop?