diffrence between if else and switch in java
Answers
Answered by
1
The if statement is uses a Boolean expression to execute the function and can often be used to check multiple conditions at a time. The switch statement uses a int expression to check each cause to see if it satisfies the conditions, if it does the statement will execute the code.
Answered by
0
Answer:
Key Differences Between if-else and switch. Expression inside if statement decide whether to execute the statements inside if block or under else block. On the other hand, expression inside switch statement decide which case to execute. ... On the other hand, switch statement evaluates only character or a integer datatype.
PrinceJK786:
hello
Similar questions