Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logical Operators Jumps Logical Operators The different logical operators found in Java Rational Operators The different rational operators found in Java.

Similar presentations


Presentation on theme: "Logical Operators Jumps Logical Operators The different logical operators found in Java Rational Operators The different rational operators found in Java."— Presentation transcript:

1 Logical Operators Jumps Logical Operators The different logical operators found in Java Rational Operators The different rational operators found in Java

2 Jumps A jump is also known as a branch A jump is when you program skips certain steps to move on to another block of code There are two types of jumps 1. Unconditional Jump = no condition is set 2. Conditional jump = a condition has to be satisfied in order for the jump to compare

3 Logical Operators Logical operators are functions used in Java They are used to set certain conditions These conditions are used when we have conditional jumps in our programs

4 Different Logical Operators There are many different operators, some of these include the following Logical OperatorMeaning &Logical AND – both must be true |Logical OR – One or both must be true ^Logical XOR – the NOT of the OR operator ||Short Circuit OR – this stops when it finds the first true &&Short Circuit AND – this stops when it finds the first true !Logical Unary NOT – true becomes false and vice versa

5 Rational Operators Rational operators in java are used when we wish to make a comparison Rational operators just like logical operators are used for conditional jumps in our java program s

6 Different Logical Operators Relational Operators Meaning ==Equal To >Greater Than <Less Than >=Greater Than or Equal To <=Less Than or Equal To !=Not Equal To

7 Is the answer to these conditions true of false? 1. 9 + 4 == 13 2. 5*5 > 10 3. 10 – 4 < 5 4. 15 >= (10+5) 5. 21 / 7 <= 4 6. 12*2 != 24

8 Is the answer to these conditions true of false? 1. 9 + 4 == 13  False 2. 5*5 > 10  True 3. 10 – 4 < 5  True 4. 15 >= (10+9)  False 5. 21 / 7 <= 4  True 6. 12*2 != 24  False


Download ppt "Logical Operators Jumps Logical Operators The different logical operators found in Java Rational Operators The different rational operators found in Java."

Similar presentations


Ads by Google