Java Notes
Java Notes
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
tincidunt ut laoreet dolore magna aliquam erat volutpat.
ava
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper s
You can use these conditions to perform different actions for different decisions.
1
● Use
ifto specify a block of code to be executed, if a specified condition is
true
● Use
elseto specify a block of code to be executed,if the same condition
is false
● Use
else ifto specify a new condition to test, ifthe first condition is
false
● Use
switchto specify many alternative blocks of codeto be executed
The if Statement
Use the
ifstatement to specify
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel
illum dolore eu feugiat nulla facilisis at vero eros et accumsan.
2