Okay in Java we have these a statement or eval statements. So to write a if statement, you can do something like this he say I create as a double w equal a 6.0 if W more than sa 4.0 and I can do something is System dot out dot println ly now value is more than 4.0 okay then I can run this project Okay W is more than 4.0 okay if wV I change this to let's say two Pi Pi if I run this project now he will give me nothing to eat I want you to display something I will put aos System dot out dot println ly w e last 4.0 Now we run and I run the project, again W is less than 4.0 k VA one two to say making more complicated. I can see if W is more than 4.0 and w is less than say say a point zero okay.
Now print system dot print ln W is more than 4.0 and ah less than a ploy zero okay bye buddies with Tina 4.0 2.0 which I shall get the ISO guy these tests here run the project okay who is more than 4.0 and less than a point zero So, just now we talked about this operator ba nn D or so now we have using these if statement l statement okay. So, let's say I want to make a more complex I can do something like this LC ah w in less than 4.0 yeah I can pull something that is a system Da, da dot print line. W is more or less than 4.0. Or else as less a system da W is more than More than 8.0 so if W is more than 4.0 and w is less than a point zero, we print these are w e is more than four and less than eight.
If W is less than 4.0 and is no more than 4.0 is not less than 8.0. W is less than 4.0. There we are printer W is less than 4.0 and w is no more than 4.0 and less than a point zero or else W is more than a point zero. Okay, so I can change from TNT to let's say, final I show. These are W is more than 4.0 II, II, II, two less than 4.0 I should get let's say ah W is less than 4.0 and v is no more than four points less than point zero okay this message if I put other values I see I see 78 yeah okay W is more than a point zero. So, this is the E FF, ELLs Even l statement.
So, if these are these are a law God is conditional statements no harm Mac that you will come to this conditional statement. If this conditional statement is not met, then you will come to this house. So this is the if else if and else statements