what is the difference between an if statement


What is the difference between an if statement and a switch statement?

The if statement is used to select between two alternatives. It uses a boolean expression to decide which alternative should be implemented.

The switch statement is used to select between multiple alternatives. It uses an int expression to verify which alternative should be executed.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what is the difference between an if statement
Reference No:- TGS0310944

Expected delivery within 24 Hours