Java Learning Made Easy by Dheeraj Mehrotra - HTML preview
PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.
Download the book in PDF, ePub, Kindle for a complete version.
IF Statement










This statement acts as a conditional control statement of Java and



checks the specified condition. If the given condition is true the given


instruction is executed otherwise the instruction is ignored. There are


different formats of if statement and is widely used for computation,


logical reasoning and decision making within a program.


A simple if statement has the following format :

if (expression)
statement1;



where an expression is the condition which if found true executes
statement1 otherwise the control comes to the next statement. 







attention@computerscienceexpertise.com




















